A. Member data have no access modifiers. B. Member data can be modified directly. C. The access modifier for methods is protected. D. The access modifier to member data is private. E. Methods provide for access and modification of data.
public class Test { public static void main (String [] args) { string foo = “blue”; string bar = foo; foo = “green”; System.out.printIn(bar); } } What is the result?()
A. An exception is thrown. B. The code will not compile. C. The program prints “null” D. The program prints “blue” E. The program prints “green”
2. public class Foo implements Runnable ( 3. public void run (Thread t) { 4. system.out.printIn(“Running.”); 5. } 6. public static void main (String[] args) { 7. new thread (new Foo()).start(); 8. ) 9. ) What is the result?()
A. An exception is thrown. B. The program exists without printing anything. C. An error at line 1 causes compilation to fail. D. An error at line 6 causes the compilation to fail. E. “Running” is printed and the program exits.