Page 65 - Trackpad_ipro 4.1_Class8
P. 65
We can accept a single value as well as multiple values by separating them with a comma in the
following way:
public class Arguments
{
public static void main(int roll_no,
String name)
{
System.out.println("Roll number is: " + roll_no);
System.out.println("Name is: " + name);
}
}
When we execute the preceding program in BlueJ,
the Method Call dialog box appears, asking us to
enter the required arguments as shown.
After entering the value of the arguments, click
on the OK button. The output will appear in the
terminal window as shown.
Reb t
A computer program can be defined as a collection of instructions to perform a specific
task.
The process of writing a program is called program coding, or programming.
There are mainly two types of programming languages: procedural and object-oriented.
Java is an object-oriented and high-level programming language.
Java follows the Write Once Run Anywhere (WORA) principle.
A class can be defined as a user-defined blueprint or prototype that is used to create
objects.
BlueJ is an IDE designed for beginners.
An identifier is the name given to an object in a Java program.
Program Coding 63

