How To Use Integer Variable in Java Programming Language
This is the simple way of declaring and using integer variabel in Java:
class UseInteger{
public static void main(String args[]){
int x; //declaring variable x as an integer
x = 100; //set x with 100
System.out.println("x = "+ x); //display x to screen
}
}
the output:
or you can see the tutorial here:
ShadowOfBdg© - All rights reserved.
No comments:
Post a Comment