Skip to content

Instantly share code, notes, and snippets.

@creyn
Created August 25, 2018 14:02
Show Gist options
  • Save creyn/ebe5216ca5f9390e0495b4187f77c65a to your computer and use it in GitHub Desktop.
Save creyn/ebe5216ca5f9390e0495b4187f77c65a to your computer and use it in GitHub Desktop.
Droga Programisty : Kod : Zmienne w Javie
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