<< Prev Question Next Question >>

Question 11/137

Given:

A) An exception is thrown at run time.
B)

C) The compilation fails due to an error on line 2.
D) The compilation fails due to an error on line 1.
E)

F)
The compilation fails due to an error on line 3.

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (137q)
Question 1: Given: /code/a/Test.java containing: (Exhibit) and /code/b/B...
Question 2: Given: (Exhibit) Which two independent changes will make the...
Question 3: Given: public class X { } and public final class Y extends X...
Question 4: Given: (Exhibit) When run and all three files exist, what is...
Question 5: Given: (Exhibit) What is the result?...
Question 6: Given: String originalPath = "data\\projects\\a-project\\..\...
Question 7: Given: (Exhibit) When is the readObject method called?...
Question 8: Given: (Exhibit) Which two changes need to be made to make t...
Question 9: Given: (Exhibit) Which two methods facilitate valid ways to ...
Question 10: Given: (Exhibit) Which code, when inserted at one or more ma...
Question 11: Given: (Exhibit) A) An exception is thrown at run time. B) (...
Question 12: Given: List&lt;String&gt; longlist = List.of("Hello","World"...
Question 13: Which is a proper JDBC URL?
Question 14: Given: (Exhibit) What is the result?...
Question 15: Given an application with a main module that has this module...
Question 16: Given: (Exhibit) What is the result?...
Question 17: Given the code fragment: (Exhibit) What is the output?...
Question 18: Given: (Exhibit) Which two constructors will compile and set...
Question 19: Given: (Exhibit) Which is true?...
Question 20: Given: (Exhibit) What action ensures successful compilation?...
Question 21: Given: (Exhibit) What is the result?...
Question 22: Given: (Exhibit) What is the correct definition of the JsonF...
Question 23: Given: (Exhibit) What prevents this code from compiling?...
Question 24: Given: (Exhibit) Why does D cause a compilation error?...
Question 25: Which code fragment prints 100 random numbers? (Exhibit)...
Question 26: Given: (Exhibit) and (Exhibit) What is the result? Joe...
Question 27: Given: (Exhibit) What is the result?...
Question 28: Given: (Exhibit) What is the result?...
Question 29: Given: (Exhibit) What is the output?...
Question 30: Given the code fragment: (Exhibit) What is the result?...
Question 31: Given: (Exhibit) What is the result?...
Question 32: A company has an existing sales application using a Java 8 j...
Question 33: Which statement about a functional interface is true?...
Question 34: Which three initialization statements are correct? (Choose t...
Question 35: Why would you choose to use a peek operation instead of a fo...
Question 36: Which method throws an exception for not-a-number and infini...
Question 37: Given these two classes: (Exhibit) And given this fragment: ...
Question 38: Given: (Exhibit) Which three are true? (Choose three.)...
Question 39: Given: (Exhibit) What is the result?...
Question 40: Given the code fragment: (Exhibit) What is the result?...
Question 41: Given the Person class with age and name along with getter a...
Question 42: Given the code fragment: (Exhibit) Which two statement inser...
Question 43: Assuming the Widget class has a getPrice method, this code d...
Question 44: Given: (Exhibit) What is the result?...
Question 45: Given: (Exhibit) After which line can we insert assert i &lt...
Question 46: How many Thing objects are eligible for garbage collection i...
Question 47: Given an application with a main module that has this module...
Question 48: (Exhibit) Why does this compilation fail?...
Question 49: Given: (Exhibit) Which two independent changes will make the...
Question 50: Given : (Exhibit) What is the correct definition of the Json...
Question 51: Given: (Exhibit) What is known about the Sportscar class?...
Question 52: Which code fragment prints 100 random numbers? (Exhibit)...
Question 53: Given: (Exhibit) What is required to make the Foo class thre...
Question 54: Given: /code/a/Test.java containing: (Exhibit) and /code/b/B...
Question 55: Given: (Exhibit) Which two methods modify field values? (Cho...
Question 56: Given: (Exhibit) Which statement on line 1 enables this code...
Question 57: Given: (Exhibit) What is the result?...
Question 58: Given: (Exhibit) What is the result?...
Question 59: Given: (Exhibit) What is the type of x?...
Question 60: Given the code fragment: (Exhibit) What is the result?...
Question 61: Given: (Exhibit) Which two lines of code when inserted in li...
Question 62: Given: (Exhibit) What is the result?...
Question 63: Which two modules include APIs in the Java SE Specification?...
Question 64: Given the code fragment: (Exhibit) What is the result? A) (E...
Question 65: Which three annotation uses are valid? (Choose three.)...
Question 66: Given: (Exhibit) and the commands: (Exhibit) What is the res...
Question 67: Given: (Exhibit) What is the output?...
Question 68: Which two statements set the default locale used for formatt...
Question 69: Given the code fragment: Which two code snippets inserted in...
Question 70: Given the code fragment: (Exhibit) Which action enables Comp...
Question 71: Analyze the code: (Exhibit) Which two options can you insert...
Question 72: Given: (Exhibit) You wants to make the reduction operation p...
Question 73: Given: (Exhibit) You want to obtain the Stream object on rea...
Question 74: Given: (Exhibit) Which is true?...
Question 75: Given the code fragment: (Exhibit) What is the result?...
Question 76: Given: (Exhibit) Which two method implementations are correc...
Question 77: Given: (Exhibit) You want to use the myResource class in a t...
Question 78: Given: (Exhibit) and (Exhibit) and (Exhibit) What is the res...
Question 79: Given: (Exhibit) Assuming that this code compiles correctly,...
Question 80: Given: (Exhibit) What is the expected result of javac?...
Question 81: Given the code fragment: (Exhibit) You want to examine wheth...
Question 82: Given: (Exhibit) What is the result?...
Question 83: Given: (Exhibit) and (Exhibit) What is the result?...
Question 84: Given: (Exhibit) When run and all three files exist, what is...
Question 85: Given: (Exhibit) You want to use the myResource class in a t...
Question 86: Given the code fragment: (Exhibit) What is the result?...
Question 87: Given: (Exhibit) Which two methods facilitate valid ways to ...
Question 88: A company has an existing Java app that includes two Java 8 ...
Question 89: Which is the correct order of possible statements in the str...
Question 90: Given: (Exhibit) and checkQuality(QUALITY.A); and (Exhibit) ...
Question 91: Given: (Exhibit) What is the result?...
Question 92: Which interface in the java.util.function package can return...
Question 93: Given: (Exhibit) What action ensures successful compilation?...
Question 94: Given: (Exhibit) Which statement on line 1 enables this code...
Question 95: Given: (Exhibit) What is the result?...
Question 96: Given the code fragment: (Exhibit) What is the result?...
Question 97: Given: Path p1 = Paths.get("/scratch/exam/topsecret/answers"...
Question 98: Given: (Exhibit) executed with this command: java Main one t...
Question 99: Given this enum declaration: (Exhibit) Examine this code: Sy...
Question 100: Given: public class X { } and public final class Y extends X...
Question 101: Given: (Exhibit) Which two statements are valid to be writte...
Question 102: Which code fragment compiles? (Exhibit)...
Question 103: There is a copyServiceAPI that has the org.copyservice. spi....
Question 104: Given: (Exhibit) What is the result?...
Question 105: Given: (Exhibit) You want to use the myResource class in a t...
Question 106: Given: (Exhibit) Assume the file on path does not exist. Wha...
Question 107: Given: (Exhibit) What is the result?...
Question 108: Given: (Exhibit) What is the type of the local variable x?...
Question 109: Given: (Exhibit) What must be added in line 1 to compile thi...
Question 110: Given this enum declaration: (Exhibit) Examine this code: Sy...
Question 111: Given: (Exhibit) What is the result?...
Question 112: Given: (Exhibit) Which loop incurs a compile time error?...
Question 113: Given: (Exhibit) Which two method implementations are correc...
Question 114: Given: (Exhibit) What is the result?...
Question 115: Given: (Exhibit) You want the code to produce this output: J...
Question 116: Given: (Exhibit) Which is true about line 1?...
Question 117: Given: /code/a/Test.java containing: (Exhibit) and /code/b/B...
Question 118: Given: (Exhibit) Which two methods modify field values? (Cho...
Question 119: Given: (Exhibit) What is the type of x?...
Question 120: Given: (Exhibit) Which statement is true about the Fox class...
Question 121: Given: (Exhibit) What is the type of the local variable x?...
Question 122: Given the code fragment: (Exhibit) You want to display the v...
Question 123: Given: (Exhibit) What is the result?...
Question 124: Given: (Exhibit) It is required that if p instanceof Pair th...
Question 125: Given: (Exhibit) Which statement is equivalent to line 1?...
Question 126: Given: (Exhibit) Which annotation should be used to remove w...
Question 127: Given: (Exhibit) What is the result?...
Question 128: Given: (Exhibit) Which two are correct? (Choose two.)...
Question 129: Given: (Exhibit) Which two allow a.Main to allocate a new Pe...
Question 130: Given: (Exhibit) Which two constructors will compile and set...
Question 131: Given: (Exhibit) What code must you insert on Line 1 to enab...
Question 132: Given the code fragment: Path currentFile = Paths.get("/scra...
Question 133: var numbers = List.of(0,1,2,3,4,5,6,7,8,9); You want to calc...
Question 134: Given: (Exhibit) What is the result?...
Question 135: Given: (Exhibit) What is the result?...
Question 136: Given: (Exhibit) Which two lines can replace line 1 so that ...
Question 137: Given: (Exhibit) What is the output?...