Question: Question 21 (0.66 points) Consult the Java API. What kind of exception might be thrown by the flip method of the class java.util.BitSet? Cannot FlipException




Question 21 (0.66 points) Consult the Java API. What kind of exception might be thrown by the flip method of the class java.util.BitSet? Cannot FlipException O IOException O IndexOutOfBoundsException O NegativeArraySizeException Question 22 (0.66 points) Consult the Java API. What kind of exception might be thrown by a constructor of the java.net.URL class? O IOException O MalformedURLException OURISyntaxException CharacterCodingException Question 23 (0.66 points) Java programmers can define new exception classes. True O False Question 24 (0.66 points) What type of statement is used to throw an exception in Java? O try/catch O throw O exception Oif Question 25 (0.66 points) Assume that 's' is null and thus a NullPointerException is thrown when s.toUpperCase() is attempted in the code below. What is printed? try { System.out.println("1..."); news = s.toUpperCase(); System.out.println("2..."); catch (NullPointerException npe) { System.out.println("3..."); O1... WN WNPWPNP Question 26 (0.66 points) Which of the following are true statements about object and primitive types. Check all that apply. An object variable actually stores a reference to the object, not the object itself. The number of object types used in a program is limited to 8 basic types. An object can be assigned to a primitive type, but not vice versa. Short and Integer are examples of object types, while short and int are examples of primitive types. Question 27 (0.66 points) Which is the range of values that can be stored in an int? O-128 to 127 0-32768 to 32767 0-2147483648 to 2147483647 O-9223372036854775808 to 9223372036854775807 Question 28 (0.66 points) What is the value of val after the following lines of code execute? double gamma = 0.98; int val = (int) gamma; 0-1 Question 29 (0.66 points) Which class is used to get a connection to a relational database? O PreparedStatement O ResultSet O Container O DriverManager Statement Question 30 (0.66 points) The JDBC API in Java provides programmatic access to ___. third party libraries relational data O build tools O unstructured data Question 31 (0.2 points) The following resources are allowed during the exam: Your textbook Your notes (electronic or hardcopy) Blue), Intelli) All materials on our course web site, including all your past work & exams (anything you can access on the course web site) Any of the web sites linked to in the Java Resources box on our course home page Type your name in the box to attest that you have not used any other resources, gotten help from another person, or performed any internet searches during this exam
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
