Question: PART 1: Multiple choice questions. (10 questions) 1. In Java classes can either have States or Behavior, but never both a. True b. False Which

 PART 1: Multiple choice questions. (10 questions) 1. In Java classes

PART 1: Multiple choice questions. (10 questions) 1. In Java classes can either have States or Behavior, but never both a. True b. False Which of these class is superclass (Parent) of every class in Java? a) String class b) Object class c) Abstract class d) ArrayList class 2. 3. Below code defines a legal class public class A a. True b. False 4. What best describes the below lines of code Fraction f-new Fraction(1, 3): Upon the execution of this code f is an object that is created, however we still need to set its numerator and denominator explicitly in the Driver class. Fraction class will only have one constructor for now onwards. This class cannot have any additional constructors. ?f is instantiated using the Fraction class constructor that takes two integer a. b. c. d. Above syntax is wrong. You cannot create and object and set the fields simultaneously in one step 5. What is the output of the following program public class A t private int i private int j; public class Driver ( public static void main(String args t1) A obj1 new A); A obj2 new A): System.out.print obji. equats(obj2)): a. True b. False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!