Which method is an appropriate way to determine the cosine of 42 degrees?()
A. Double d = Math.cos(42); B. Double d = Math.cosine(42); C. Double d = Math.cos(Math.toRadians(42)); D. Double d = Math.cos(Math.toDegrees(42)); E. Double d = Math.cosine(Math.toRadians(42));
3. string foo = “ABCDE”; 4. foo.substring(3); 5. foo.concat(“XYZ”); 6. Type the value of foo at line 6.()
public class X { public object m () { object o = new float (3.14F); object oa = new object [1]; oa[0]= o; o = null; return oa[0]; } } When is the float object created in line 3, eligible for garbage collection?()
A. Just after line 5 B. Just after line 6 C. Just after line 7 (that is, as the method returns) D. Never in this method.