When a Java application runs, what is the first method called start main trigger jump In Java you can define a class with variables and methods. yes no Can you define a variable of that class type? yes no it depends A constructor is method with a void return type? true false Foo myFoo = new Foo();Foo anotherFoo = myFoo;How many objects are there? 0 1 2 Some Java methods throw Exceptions. Does the Java compiler require all exceptions to be caught in a try..catch block? yes no what's a try..catch block What actually is an exception that gets thrown? a class an object a runtime event a compiletime event The java try..catch block includes a third optional block called.. finally revert continue break jump The following are equivalent:int [] arrayOfInts;int arrayOfInts []; yes no What is the size of the array created with: int [] myArr; 0 1 the array grows as elements are added there is no array What values are in the array: int [] grades = new int[30]; random values whatever is in memory at the time 0's 1's How do you determine the length of an array? store a variable that holds the length when you create the array use the length() method use the size() method use the length public variable use the size public variable If a class called "Foo" has a static method called "bar()", can the method be called without creating an instance of the class Foo? yes no no clue Where is an instance variable declared in a class definition? inside the class, outside any method inside the class, inside one of the methods Where is a local variable declared in a class definition? inside the class, outside any method inside the class, inside one of the methods Can an instance variable and a local variable be declared with the SAME name? yes no Must a local variable in a method be initialized before use? yes, if not the compiler will report an error no, the variable will be auto-initialized to the default value for the type (e.g. int = 0) When a primitive type is passed as a parameter, and that value is changed in the method, will the changed value be visible in to the caller? yes no When an object instance is passed as a parameter, and that value is changed in the method, will the changed value be visible in to the caller? yes no When an object is allocated with the new operator, is a constructor always called> yes no Can a class define more than one constructor? yes no In a constructor, how can you call the constructor of the superclass? this(); super(); construct(); it is not allowed, only one constructor can be called When an object is no longer needed, how do you reclaim memory for that object? call finalize(); call dealloc(); java does it for you Java supports multiple inheritance? true false A subclass inherits all of the public members of its parent all of the public and protected members of its parent all of the public, private and protected members of its parent MountainBike is descended from Bicycle and Object. Therefore, a MountainBike is a Bicycle and is also an Object, and it can be used wherever Bicycle or Object objects are called for. true false Is this legal? Object obj = new MountainBike(); yes no Is this legal? Object obj = new MountainBike(); MountainBike myBike = obj; yes no Is this legal? Object obj = new MountainBike();MountainBike myBike = (MountainBike)obj; yes no Is this legal? Object obj = new Object(); MountainBike myBike = (MountainBike)obj; yes compiler will report an error runtime exception will be thrown no idea legal? if (obj instanceof MountainBike) { MountainBike myBike = (MountainBike)obj;} yes no