Implicitní přetypování v jazyce java

Příklady kódu

0
0

implicitní přetypování v jazyce java

// Implicit casting is the art of casting one variable type to another one.
// For example:
short x = 1
int y = x
// You now casted a short variable to an integer variable.
// This can also be done from a string to an integer, by using Integer.parseInt()
// So it can be done like this:

convertThis = "50";
convertedString = Integer.parseInt(convertThis);
// Now you converted a string to an integer.
// Happy coding!

Související stránky

Související stránky s příklady

V jiných jazycích

Tato stránka je v jiných jazycích

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................