-
-
Save creyn/ebe5216ca5f9390e0495b4187f77c65a to your computer and use it in GitHub Desktop.
Droga Programisty : Kod : Zmienne w Javie
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 Zmienne | |
{ | |
public static void main(String[] args) | |
{ | |
int liczba = 100; | |
System.out.println("Liczba to: " + liczba); | |
liczba = 200; | |
System.out.println("Liczba to: " + liczba); | |
// To jest komentarz. Jest on niewidoczny dla kompilatora | |
// i zostanie pominiety w procesie kompilacji. | |
// Odkomentuj ponizsze dwie linijki aby zobaczyc blad kompilacji. | |
//liczba = 10.5; | |
//System.out.println("Liczba to: "+ liczba); | |
/* | |
Komentarz moze byc jednolinijkowy, wtedy musi zaczynac sie od // | |
Ale moze tez byc wielolinijkowy. | |
Tak jak ten. | |
Nalezy umiescic go pomiedzy znacznikami / * oraz * / (bez spacji) | |
*/ | |
/* | |
String liczba = "To jest tekst"; | |
System.out.println("Liczba to: " + liczba); | |
*/ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment