TypesAndVariables

From ggc

Jump to: navigation, search

01 import java.util.*;
02 /**
03  * All about my application here.
04  @author Jam Jenkins
05  */
06 public class TypesAndVariables
07 {
08   public static void main(String[] args)
09   {
10     String lastName;//declaring
11     lastName="Jenkins";//initializing
12     int middleName;
13     middleName=45;
14     System.out.println("Hello " + middleName + " " + lastName + ".");
15     char letter='g';
16     System.out.println(letter);
17 
18     System.out.println("What is your name?");
19     Scanner scanner=new Scanner(System.in);
20     String yourName=scanner.next();
21     System.out.println("Hello "+yourName);
22   }
23 }


Download/View TypesAndVariables.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter