Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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?

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions