Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- //moja pierwsza deklaracja
- //typ nazwa;
- int liczba = 5;
- int liczba2 = 10;
- int wynik = liczba + liczba2;
- System.out.println(liczba + liczba2);
- //tekst
- String powitanie = "Cześć ";
- System.out.println(powitanie.charAt(powitanie.length() - 1));
- System.out.println(powitanie.length());
- // char znak = 'a';
- double liczbazmiennoprzecinkowa = 5.9;
- int przepisz = (int) liczbazmiennoprzecinkowa;
- System.out.println(przepisz);
- // ==
- // <
- // >
- // <=
- // >=
- // !=
- //sout < ---System.out.println();
- // double srednia = 3;
- //
- // if(srednia >= 5) {
- // System.out.println("Nowy komputer! i7 + 64gb ram + 2TB SSD");
- // }else if(srednia >= 4){
- // System.out.println("Nowy komputer! 57 + 8gb ram + 256gb SSD");
- // }else if(srednia >= 3.5){
- // System.out.println("Uzywany komputer z i5 4gen 4gb ram + HDD 1TB");
- // }else{
- // System.out.println("Nie ma nowego komputera :(");
- // }
- for (int i = 0; i < 5; i++) {
- System.out.println("TEST!");
- }
- }
- }
- // kopiuj -> ctrl + c
- // wklej -> ctrl + v
- // wytnij -> ctrl + x
- // zmiana koloru tła -> ctrl + tylda
- // cofnij -> ctrl + z
- // cofnij cofnięcie -> ctrl + shift + z
- // uruchom aplikację -> shift + f10
- // komentowanie -> ctrl + /
- // duplikowanie linii -> ctrl + d
- // formatowanie kodu -> ctrl + alt + l
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement