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 { 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
Get step-by-step solutions from verified subject matter experts
