/**
*
* @author HZembr01
*/
class TypyObiektowe {
/**
* @param args the command line arguments
*/
public static void main
(String[] args
) { Integer calkowita,minimum
=2,maksimum
=2; //calkowita = 5;
//calkowita.
System.
out.
println("wartosc minimalna int to: "+minimum.
MIN_VALUE+" a najwieksza to: "+maksimum.
MAX_VALUE);
ulamkowa
= new Double(3.1419); //ulamkowa = 3.1419;
//ulamkowa.
ulamek
= new Float (3.14F
); // ulamek = 3.14F;
if(a == b)
System.
out.
println("prawda!"); else
if(a.equals(b))
System.
out.
println("prawda!"); else
if(a == b)
System.
out.
println("prawda!"); else
if(a.equals(b))
System.
out.
println("prawda!"); else
}
}
LyoqCiAqCiAqIEBhdXRob3IgSFplbWJyMDEKICovCmNsYXNzIFR5cHlPYmlla3Rvd2UgewoKICAgIC8qKgogICAgICogQHBhcmFtIGFyZ3MgdGhlIGNvbW1hbmQgbGluZSBhcmd1bWVudHMKICAgICAqLwogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewogICAgICAgIEludGVnZXIgY2Fsa293aXRhLG1pbmltdW09MixtYWtzaW11bT0yOwogICAgICAgIGNhbGtvd2l0YSA9IG5ldyBJbnRlZ2VyKDUpOwogICAgICAgIC8vY2Fsa293aXRhID0gNTsKICAgICAgICAvL2NhbGtvd2l0YS4KICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIndhcnRvc2MgbWluaW1hbG5hIGludCB0bzogIittaW5pbXVtLk1JTl9WQUxVRSsiIGEgbmFqd2lla3N6YSB0bzogIittYWtzaW11bS5NQVhfVkFMVUUpOwogICAgICAgIAogICAgICAgIERvdWJsZSB1bGFta293YTsKICAgICAgICB1bGFta293YSA9IG5ldyBEb3VibGUoMy4xNDE5KTsKICAgICAgICAvL3VsYW1rb3dhID0gMy4xNDE5OwogICAgICAgIC8vdWxhbWtvd2EuCiAgICAgICAgRmxvYXQgdWxhbWVrOwogICAgICAgIHVsYW1layA9IG5ldyBGbG9hdCAoMy4xNEYpO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