Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HelloWorld {
- public static void main(String args[]){
- //This is just a string called HelloWorld, currently it is blank
- String HelloWorld;
- //Int is a number without a decimal
- int number;
- //This is an int that has a decimal
- double decimal;
- /*
- * This is some fancy commenting
- * It is good for when you need to comment more than one line at a time
- */
- HelloWorld="Hello World, you did it!";
- number=5;
- decimal=number+5.5;
- System.out.println(HelloWorld+" "+number+" "+decimal);
- int new1=100*8;
- int new2=5+6;
- double new3=9/3;
- int new4=9-12;
- System.out.println("And the numbers ARE!: "+new1+" "+new2+" "+new3+" "+new4);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement