1Z0-815 Exam Questions
119 real 1Z0-815 exam questions with expert-verified answers and explanations. Page 2 of 3.
- Question #53
Which two modules include APIs in the Java SE Specification? (Choose two.)
- Question #54
Given: What is the output?
- Question #55
Which two statements are true about the modular JDK? (Choose two.)
- Question #56
Given the code fragment: What is the result?
- Question #57
Given: What is the result?
- Question #58
Which set of commands is necessary to create and run a custom runtime image from Java source files?
- Question #59
Given: What is the result?
- Question #60
Given: It is required that if p instanceof Pair then p.isValid() returns true. Which is the smallest set of visibility changes to insure this requirement is met?
- Question #61
Given: What is the result?
- Question #62
Which two are benefits of polymorphism?
- Question #63
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
- Question #64
Which statement best describes encapsulation?
- Question #65
View the exhibit: public class Student { public String name = ""; public int age = 0; public String major = "Undeclared"; public boolean fulltime = true; public void display() { Sy...
- Question #66
Given: What is the result?
- Question #67
Given: What is the result?
- Question #68
Given: executed using this command: java Myclass My Car is red What is the output of this class?
- Question #69
Given: Which two allow a.Main to allocate a new Person? (Choose two.)
- Question #70
Given: Which loop incurs a compile time error?
- Question #71
Which two statements are true about Java modules? (Choose two.)
- Question #72
What should keyword1 and keyword2 be respectively, in oreder to produce output 2345? int [] array = {1,2,3,4,5}; for (int i: array) { if ( i < 2) { keyword1 ; } System.out.println(...
- Question #73
What is the result? boolean log3 = ( 5.0 != 6.0) && ( 4 != 5); boolean log4 = (4 != 4) || (4 == 4); System.out.println("log3:"+ log3 + \nlog4" + log4);
- Question #74
Which statement will emoty the contents of a StringBuilder variable named sb?
- Question #75
What is the result? Class StaticField { static int i = 7; public static void main(String[] args) { StaticFied obj = new StaticField(); obj.i++; StaticField.i++; obj.i++; System.out...
- Question #76
Given: Which two lines of code when inserted in line 1 correctly modifies instance variables? (Choose two.)
- Question #77
Given: What is the expected result of javac?
- Question #78
Given: Which is true?
- Question #79
Given: Which would cause s to be AQCD?
- Question #80
Given: Which two lines cause compilation errors? (Choose two.)
- Question #81
Which describes a characteristic of setting up the Java development environment?
- Question #82
Which two are valid array declaration?
- Question #83
Given: 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.p...
- Question #84
Given: public class MainMethod { void main() { System.out.println("one"); } static void main(String args) { System.out.println("two"); } public static void main(String[] args) { Sy...
- Question #85
Given: public class ScopeTest { int j, int k; public static void main(String[] args) { ew ScopeTest().doStuff(); } void doStuff() { nt x = 5; oStuff2(); System.out.println("x"); }...
- Question #86
A method is declared to take three arguments. A program calls this method and passes only two arguments. What is the results?
- Question #87
Given: What is the result?
- Question #88
Given: Which two statements are true if the method is added to Bar? (Choose two.)
- Question #89
Given the code fragment: What is the result?
- Question #90
Given: executed using command: java Hello "Hello World" Hello World What is the output?
- Question #92
Given the code fragment: What is the result?
- Question #93
Given: What is the result?
- Question #96
Given: What is the result?
- Question #97
Which three are valid replacements for foo so that the program will compiled and run? public class ForTest { public static void main(String[] args) { int[] arrar = {1,2,3}; for ( f...
- Question #98
Given: public class SampleClass { public static void main(String[] args) { AnotherSampleClass asc = new AnotherSampleClass(); SampleClass sc = new SampleClass(); sc = asc; System.o...
- Question #99
Given the code fragment: int b = 3; if ( !(b > 3)) { System.out.println("square"); }{ System.out.println("circle"); } System.out.println("..."); What is the result?
- Question #100
What is the proper way to defined a method that take two int values and returns their sum as an int value?
- Question #101
Which two are Java Exception classes?
- Question #102
Which two statements are correct about try blocks? (Choose two.)
- Question #103
Given: What is the output?
- Question #104
Given: What is the result?
- Question #105
Given: What is the result?