Question: Can someone please explain what I am doing wrong? Object creation Create an object of Student' class and call display function. Output Object created successfully

Can someone please explain what I am doing wrong?

Can someone please explain what I am doing wrong? Object creation Create

an object of Student' class and call display function. Output Object created

Object creation Create an object of Student' class and call display function. Output Object created successfully display function called successfully + Test Case(s) Default Score Weight: 100% Compiler: Java Student.java Student.java entrypoint.cz 1 import java.util.*; 3. public class Student { public static void main(String[] args) { Student s = new Student(); s.display(); class Student { public Student() { System.out.println("Object created successfully"); public void display() { System.out.println("display function called successfully"); } 15 16 } + Add Custom Test Case OUTPUT CODE REVIEW COMMENT A Error Student.java:6: error: cannot find symbol s.display(); symbol: method display() location: variable s of type Student Student.java:7: error: class Student is already defined in package unnamed package class Student {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!