Dasar Java : Variabel – Assignment Variabel di Java

Oleh : Reza Ervani

بسم الله الرحمن الرحيم

Assignment Variabel di Java

Di java kita melakukan assignment (pemberian nilai) ke variabel seperti berikut :


myByte   = 127;

myFloat  = 199.99;

myString = "string value";

Kita juga dapat melakukan assignment suatu nilai ke variabel ketika dia dideklarasikan. Berikut caranya :


byte   myByte   = 127;

float  myFloat  = 199.99;

String myString = "string value";

About Reza Ervani 387 Articles
Adalah pendiri programming.rezaervani.com -

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.