Question: What is wrong in the following code? J/ TestMyString.java class TestMyString { public static void main(String[] args) { MyString a = new MyString 0; a.printo;

 What is wrong in the following code? J/ TestMyString.java class TestMyString

What is wrong in the following code? J/ TestMyString.java class TestMyString { public static void main(String[] args) { MyString a = new MyString 0; a.printo; } } // MyString.java, in the same package as TestMyString.java class MyString { String s; MyString(String news) { S = news; } public void print() { System.out.print(s); } k 11 Point

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!