Difference between revisions of "Java"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 12: | Line 12: | ||
== variables == | == variables == | ||
<source lang="java"> | <source lang="java"> | ||
| − | public class | + | public class variables { |
public static void main(String[] args) { | public static void main(String[] args) { | ||
| Line 18: | Line 18: | ||
short myShort; //Short 16 bit | short myShort; //Short 16 bit | ||
long myLong; //Long 64 bit | long myLong; //Long 64 bit | ||
| + | byte myByte; //Byte 8 bit | ||
double myDouble; //Double | double myDouble; //Double | ||
| Line 23: | Line 24: | ||
char myChar = 'y'; //Char | char myChar = 'y'; //Char | ||
| − | + | boolean myBoolean = true; //Boolean | |
} | } | ||
}</source | }</source | ||
Revision as of 02:47, 26 March 2015
hello world
public class aplication {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
variables
<source lang="java"> public class variables {
public static void main(String[] args) { int myInt = 88; //Integer 32 bit
short myShort; //Short 16 bit
long myLong; //Long 64 bit
byte myByte; //Byte 8 bit
double myDouble; //Double
float myFloat = 325.25f //Float
char myChar = 'y'; //Char
boolean myBoolean = true; //Boolean
}
}</source