3. Watch the story, built from zero
Story modeStory mode
21 scenes · about 4 min · narrated- just created or just finished
- being filled or read
In real life
The blank admission form from the last lesson. It is not a student yet.
Classes and objects
- name
- marks
On the screen
Nothing printed yet
1class Student { // the blueprint2String name; int marks; // fields3Student(String name, int marks) { // the constructor4this.name = name; // this = the new object5this.marks = marks;6}7}8public class Main {9public static void main(String[] args) {10Student asha = new Student("Asha", 70);11Student ravi = new Student("Ravi", 55);12System.out.println(asha.name + " " + asha.marks);13System.out.println(ravi.name + " " + ravi.marks);14}15}