Ex.63Given:class X{static void m(int[] i ){i[0] += 7;}public static void main (String [] args){int[] j = new int[1];j[0] = 12 ;m(j) ;System.out.println(j[0]) ;}}What is the result?A. 7B. 12C. 19D.Compilation failsE.An exception is thrown at run tiomeAns: CEx.64Which two statements are true?
、EEx.65Given:class Overloading{int x(double d){System.out.println(“one”) ;return 0 ;}String x(double d ){System.out.println(“two”) ;return null ;}double x(double d ){System.out.println(“three”) ;return 0.0 ;}public static void main(String[] args){new Overloading( ).x(4.0) }}What is the result?Ex.66The ctach clause argument is always of type_______.
EX.67Given the code fragment:ArrayList<Integer>list = new ArrayList<>(1) ;list.add(1001) ;list.add(1002);System.out.println(List.get(list.size( ))) ;What is th result?A.Compilation fails due to an error on line 11.B.An exception is thrown at run time due to error on line 13C.An exception is thrown at run time due to error on line 14D.1002Ans: CEx.68View the Exhibitpublic class Hat{public int ID = 0 ;public String name = “Hat” ;public String size = “One Size Fit All” ;public String color = “ ”;public String getName( ){return name ;}public void setName(String name){this.name = name ;}}Given:public class TestHat{
public static void main(String[ ] args){Hat blackCowboyHat = new Hat( ) ;}}Which statement sets the name of the Hat instance?
doMoreStuff( );System.out.print(“3 ”) ;}public static void doMoreStuff( ) {System.out.print(“4”) }}Which two are possiblie outputs?Ex.70Given:public class MyFor{public static void main(String [] args){for (int ii = 0 ; ii < 4 ; ii++ ){System.out.print(“ii = ”+ ii);ii = ii + 1 ;}}}What is the result?