learningjava/27june2025/Main.java
2025-06-27 11:23:46 +03:00

51 lines
1.4 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import java.util.Scanner;
import java.util.concurrent.TimeUnit;
public class Main {
public static void main(String[] args) throws InterruptedException {
for (int i = 1; i<=5;) {
System.out.println(i);
i++;
}
int a = 0;
while (a <= 5) {
System.out.println(a);
a++;
}
String[] liste = {"A","B","bu for ne la böyle pythonda sadece bu amaçla kullanıyordum"};
for (String hebele : liste) {
System.out.println(hebele);
}
/*
Scanner scanner = new Scanner(System.in);
int e = 1;
for (int f = scanner.nextInt(); f > 0;) {
e = e * f;
f = f - 1;
}
System.out.println(e);
*/
//System.out.println(f);
int g = 0;
do {
g ++;
System.out.println(g);
} while (g < 10);
int deger = 0;
int sayi = 1337;
while (sayi > 0) {
deger += sayi % 10;
sayi = sayi / 10;
}
System.out.println(deger);
while (true) {
break;
}
//TimeUnit.SECONDS.sleep(3);
//Runtime.getRuntime().wait(3000);
System.out.println(System.getProperty("os.name"));
System.out.println(System.getenv().get("WAYLAND_DISPLAY"));
String m = "b";
String j = null;
}
}