Sign In
Home/Oracle/1z0-819/Free questions

1z0-819 — Free Practice Questions

10 free sample questions from a bank of 237, with the correct answers and explanations. No signup required — start practising right now.

1Given: What is the result?
1z0-819 question 1
  • 2-4
  • 0-6 1-5 2-4
  • 1-5
  • 1-5 2-4
  • The compilation fails due to an error in line 1.
  • 0-6
  • 0-6 2-4
Answer: C
2Given TripleThis.java: Compiling TripleThis.java gives this compiler warning: Note: TripleThis.java uses unchecked or unsafe operations. Which two replacements remove this compiler warning and prints 12? (Choose two.)
1z0-819 question 2
  • Replace line 12 with public static void printValue(Function f, int num) {
  • Replace line 12 with public static void printValue(Function f, T num) {
  • Replace line 9 with Function tripler = x —> { return (Integer) x * 3; }
  • Replace line 12 with public static void printValue(Function f, Integer num) {
  • Replace line 9 with Function tripler = x -> { return x * 3; }
  • Replace line 9 with Function tripler = x -> [ return x * 3; ]
Answer: A, D
3Given the code fragment: What change on line 1 will make this code compile?
1z0-819 question 3
  • Add catch(M | L e)
  • Add catch(L e)
  • Add catch(N | L | M e)
  • Add catch(L | N e)
  • Add catch(L | M | N e)
Answer: B
4Given the code fragment: Which two code snippets inserted independently inside println method print Mondial:domainmodel? (Choose two.)
1z0-819 question 4
  • Main.prefix + Main.name
  • prefix + getName
  • Main.prefix + Main.getName()
  • new Main().prefix + new Main().name
  • prefix + name
  • prefix + Main.name
Answer: C, D
5Given the code fragment: What is the result?
1z0-819 question 5
  • [Lettuce, Kale]
  • A compilation error is thrown.
  • [Lettuce, Kale] [Seabass, Salmon]
  • [Kale, Lettuce] [Salmon, Seabass]
Answer: C
6Given: Automobile.java - Car.java - What must you do so that the code prints 4?
1z0-819 question 61z0-819 question 6
  • Remove the parameter from wheels method in line 3.
  • Remove abstract keyword in line 1.
  • Replace the code in line 2 with Car ob = new Car();.
  • Add @Override annotation at line 2.
Answer: A
7Which module is required for any application using Swing or AWT?
  • java.desktop
  • java.prefs
  • java.se
  • java.logging
  • java.rmi
Answer: A
8Which set of commands is necessary to create and run a custom runtime image from Java source files?
  • java,jdeps
  • javac,jlink
  • javac,jar
  • jar,jlink
Answer: B
9Given the code fragment: Which would cause s to be AQCD?
1z0-819 question 9
  • s.replace(s.indexOf("B"), s.indexOf("B"), "Q");
  • s.replace(s.indexOf("A"), s.indexOf("B"), "Q");
  • s.replace(s.indexOf("B"), s.indexOf("C"), "Q");
  • s.replace(s.indexOf("A"), s.indexOf("C"), "Q");
Answer: C
10Given: Which two methods facilitate valid ways to read instance fields? (Choose two.)
1z0-819 question 10
  • getCCount
  • getTCount
  • getACount
  • getGCount
  • getTotalCount
Answer: B, C

Want the full bank of 237 questions for 1z0-819? See all practice exams.