Skip to content
Pass Any WGU OA Exam Now & Pay After You Pass. Contact Us!
  1. Home
  2. WGU Exams
  3. WGU D286
  4. Set 1
WGU D286 · Java Fundamentals

WGU D286 Practice Questions – Set 1

50 multiple-choice questions with answers and detailed explanations. Untimed — choose an answer to check it instantly.

Question 1 of 50

Which method serves as the entry point of a Java application?

Question 2 of 50

What does JVM stand for?

Question 3 of 50

What file extension does compiled Java bytecode use?

Question 4 of 50

Which of the following is a primitive data type in Java?

Question 5 of 50

How many bits does a Java int occupy?

Question 6 of 50

Which primitive type would you use for a value requiring decimal precision in financial calculations?

Question 7 of 50

What is the default value of an uninitialized int instance field in Java?

Question 8 of 50

What is the default value of an uninitialized boolean field?

Question 9 of 50

Which keyword declares a value that cannot be reassigned in Java?

Question 10 of 50

What does the static keyword indicate when applied to a field?

Question 11 of 50

Which access modifier makes a member accessible only within its own class?

Question 12 of 50

Which access modifier makes a member accessible from any class?

Question 13 of 50

What is the scope of a member declared with no access modifier?

Question 14 of 50

What does the protected access modifier permit?

Question 15 of 50

How do you write a single-line comment in Java?

Question 16 of 50

Which operator concatenates two Strings in Java?

Question 17 of 50

What is the result of the expression 7 / 2 when both operands are int?

Question 18 of 50

What does the expression 7 % 2 evaluate to?

Question 19 of 50

What does the ++ operator do when used as i++?

Question 20 of 50

Which comparison operator tests whether two primitive values are equal?

Question 21 of 50

Why should Strings be compared with equals() rather than ==?

Question 22 of 50

What does the logical && operator do in Java?

Question 23 of 50

What is short-circuit evaluation?

Question 24 of 50

What is the purpose of the if-else statement?

Question 25 of 50

Which loop in Java always executes its body at least once?

Question 26 of 50

What is the enhanced for loop (for-each) used for?

Question 27 of 50

How do you declare an array of 10 integers in Java?

Question 28 of 50

What is the index of the last element in a Java array of length n?

Question 29 of 50

Which field returns the number of elements in a Java array?

Question 30 of 50

What exception is thrown when accessing an invalid array index?

Question 31 of 50

What is a method signature in Java?

Question 32 of 50

What is method overloading?

Question 33 of 50

Can two methods be overloaded by differing only in return type?

Question 34 of 50

What is a class in Java?

Question 35 of 50

What is an object in Java?

Question 36 of 50

Which keyword creates a new object instance?

Question 37 of 50

What is a constructor?

Question 38 of 50

What happens if a class defines no constructor?

Question 39 of 50

What does the this keyword refer to?

Question 40 of 50

What is encapsulation?

Question 41 of 50

What is the purpose of getter and setter methods?

Question 42 of 50

What does the String class's length() method return?

Question 43 of 50

Why are Java Strings described as immutable?

Question 44 of 50

Which class is preferred for building Strings in a loop?

Question 45 of 50

What does the substring(2, 5) method return for the String "programming"?

Question 46 of 50

What is a wrapper class in Java?

Question 47 of 50

What is autoboxing?

Question 48 of 50

What does the final keyword do when applied to a class?

Question 49 of 50

What is a package in Java?

Question 50 of 50

What does the import statement accomplish?

Set 1 complete

You scored 0%

0 correct out of 0 answered (50 questions in this set).

Next: Set 2

Struggling with WGU D286?

If this exam is giving you a hard time, let us be your helping hand. Contact us, and we'll provide the assistance you need to pass and move forward.

Chat Now