1. public class X { 2. public static void main (String [] args) { 3. Strings = new String (“Hello”); 4. modify (s); 5. System.out.printIn(s): 6. } 7. 8. public static void modify (String s) { 9. s + = “world!”’ 10. } 11. }
Show comments for this question (0) Add comments Link to this question
1. interface Foo { 2. int k = 0; 3. } 4. 5. public class Test implements Foo { 6. public static void main (String args []){ 7. int i: 8. Test test = new Test (): 9. i = test. k: 10. i = Test.k: 11. i = Foo. k: 12. } 13. }
Show comments for this question (1) Add comments Link to this question