Wednesday, September 22, 2021

variables with default value


public class BSIT
{

   
public static void main(String[] args)
    {
       
int numberOfStudents = 123; // variable with default value
       
        // to add variable to display use the " + " sign without quotation
       
System.out.print("My Student Id is: " + numberOfStudents);
       
   
}

}
Output
  My Student Id is: 123


















 

No comments:

Post a Comment

Contact Us

Contact Form

Name

Email *

Message *