Answered step by step
Verified Expert Solution
Question
1 Approved Answer
give me the run screen the run screen and if thir is error fix it import java.io.*; import java.util.Scanner; class Student{ private String name; private
give me the run screen
the run screen and if thir is error fix it
import java.io.*;
import java.util.Scanner;
class Student{
private String name;
private int id;
public double q1;
public double q2;
public double q3;
public void setName(String name){
this.name=name;
}
public void setld(int id){
this.id=id;
}
public String toString(){
return"Student[name="+name+",id="+id+",q1="+q1+",q2="+q2+",q3="+q3+"]";
}
}
class Main{
public static void main(String[] args) {
Student student1=new Student();
Student1.setname("jeje");
Student1e.setId(123);
Student1.q1=80.5;
Student1.q2=90.0;
Student1.q3=70.0;
System.out.println(Student1.toString());
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started