+91-85006-22255
public class One { String msg; void setOne(String str1) { msg = str1; } String getOne() { return msg; } public static void main(String s[]) { One objone = new One(); objone.setOne("ONE"); System.out.print(objone.getOne()); }}
Topic: Calling A Class From Another Class In Java
Read this topic Take test on this topic
Open In App