// A for loop that prints the numbers from 1 to 10
for (int i = 1; i <= 10; i++) {
System.out.println(i);
}
This file contains hidden or 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
Start-Process PowerShell -WindowStyle Maximized |
This file contains hidden or 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
private void getSystemProperties() { | |
System.getProperties().list(System.out); | |
} |
This file contains hidden or 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 IllegalStateExceptionInWhile { | |
public static void main(String[] args) { | |
seeMore(); | |
run(); | |
iamNotWorking(); | |
} | |
static void run() { | |
int counter = 0; |
This file contains hidden or 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 WhileLoopsTrueForever { | |
public static void main(String[] args) { | |
firstPhase(); | |
sum(5, 2017); | |
secondPhase(); | |
iamOK(); | |
} |
Apache Maven
-
Make your project
NewerOlder