Create a Java class called Student with the USN, Name, Branch, Phone details as variables within it. Write a Java program to create N Student objects and print the USN, Name, Branch, and Phone of these objects with suitable headings.
Procedure:
Step 1: Uncheck the Module option
At
the bottom, uncheck:
Create module-info.java file
This
is not needed for simple Java programs.
Leave
everything else as it is.
Then click Finish.
Step 2: Create the Java Class
After the project is created:
In
the Package Explorer (left side), expand your project (joda).
Right-click
on the src folder.
Select
New → Class.
You'll see a window like this.
Fill it as:
Package: (leave empty)
Name: Student
public static void main(String[]
args) (check this box)
Then click Finish.
No comments:
Post a Comment