This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HelloWorld | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println("Hello World"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) | |
{ | |
//Do something here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HelloWorld | |
{ | |
public void HelloWorld() | |
{ | |
System.out.println("Hello World"); | |
} | |
public static void main(String[] args) | |
{ | |
HelloWorld hw = new HelloWorld(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int i = 1; | |
if (i < 2) | |
{ | |
System.out.println("This is an if statement that works"); | |
} | |
int i = 4; | |
if (i < 2) | |
{ | |
System.out.println("This is an if statement that doesn't works"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int x = 2**2; | |
if(x > 4) | |
{ | |
System.out.println("Does this work?"); | |
} | |
int i = 9; | |
if(i % 2 == 1) | |
{ | |
System.out.println("Does this work?"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int x = 2**2; | |
if(x > 4) | |
{ | |
System.out.println("Does this work?"); | |
} | |
else if(x % 2 == 0) | |
{ | |
System.out.println("Does this work?"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int x = 2**2; | |
if(x > 4) | |
{ | |
System.out.println("Does this work?"); | |
} | |
else if(x % 2 == 1) | |
{ | |
System.out.println("Does this work?"); | |
} | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 1; i <= 1001; i += 2) | |
{ | |
System.out.println(i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int i = 1; | |
while (int i <= 1001) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int i = 1; | |
while (int i <= 1001) | |
{ | |
System.out.println(i); | |
i+=2; | |
} |
OlderNewer