Advertisement
Guest User

Untitled

a guest
Apr 18th, 2012
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1.  
  2. public class HelloWorld {
  3.  
  4. public static void main(String args[]){
  5. //This is just a string called HelloWorld, currently it is blank
  6. String HelloWorld;
  7.  
  8. //Int is a number without a decimal
  9. int number;
  10.  
  11. //This is an int that has a decimal
  12. double decimal;
  13.  
  14. /*
  15. * This is some fancy commenting
  16. * It is good for when you need to comment more than one line at a time
  17. */
  18. HelloWorld="Hello World, you did it!";
  19. number=5;
  20. decimal=number+5.5;
  21.  
  22. System.out.println(HelloWorld+" "+number+" "+decimal);
  23.  
  24.  
  25. int new1=100*8;
  26. int new2=5+6;
  27. double new3=9/3;
  28. int new4=9-12;
  29. System.out.println("And the numbers ARE!: "+new1+" "+new2+" "+new3+" "+new4);
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement