Question: help Choose the missing line of code to print the age of student s1 as 20.public class Student {int age; Student() {//missing code} Student(int age)
help


Choose the missing line of code to print the age of student s1 as 20.public class Student {int age; Student() {//missing code} Student(int age) { this.age = age; } public static void main(String args[]) { Student s1=new Student(); System.out.println(s1.age); }} O this. Student(20); this (20); O super. Student(20); A O super(20); Choose the missing line of code to print the age of student s1 as 20.public class Student {int age; Student() {//missing code} Student(int age) { this.age = age; } public static void main(String args[]) { Student s1=new Student(); System.out.println(s1.age); }} O this. Student(20); this (20); O super. Student(20); A O super(20)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
