0

is there something wrong? explain to me

class Introduction { public static void main(String args[]) { byte x=50.5; System.out.println("Nilai dari variabel x= "+x); } }

13th Apr 2021, 6:19 AM
Nasywa Putri Kamila
Nasywa Putri Kamila - avatar
5 Respuestas
+ 4
double x = 50.5; or byte x = 50;
13th Apr 2021, 6:30 AM
Tibor Santa
Tibor Santa - avatar
+ 4
The byte type can store integer numbers between -127 and +128 If you want to have decimals, then use float or double.
13th Apr 2021, 6:24 AM
Tibor Santa
Tibor Santa - avatar
+ 3
Oh, I see... I understand ... thank you very much 😊😊
13th Apr 2021, 6:33 AM
Nasywa Putri Kamila
Nasywa Putri Kamila - avatar
+ 2
How then?
13th Apr 2021, 6:26 AM
Nasywa Putri Kamila
Nasywa Putri Kamila - avatar
0
Nasywa Putri Kamila like this double a=5.03373d; float a= 4.433f;
13th Apr 2021, 12:26 PM
A S Raghuvanshi
A S Raghuvanshi - avatar