Part II: fill-in-the-blank questions (2 points * 10) 1. The four main principles of OOP are: encapsulation, B1, B2, and

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Part II: fill-in-the-blank questions (2 points * 10) 1. The four main principles of OOP are: encapsulation, B1, B2, and

Post by answerhappygod »

Part Ii Fill In The Blank Questions 2 Points 10 1 The Four Main Principles Of Oop Are Encapsulation B1 B2 And 1
Part Ii Fill In The Blank Questions 2 Points 10 1 The Four Main Principles Of Oop Are Encapsulation B1 B2 And 1 (119.25 KiB) Viewed 15 times
Part II: fill-in-the-blank questions (2 points * 10) 1. The four main principles of OOP are: encapsulation, B1, B2, and B3. 2. The primitive types in Java are int, B4, long, byte, B5, float, double, and boolean. 3. Usually, we define the main function as follows: B6 void main(String[] args) ... 4. B7 polymorphism (a.k.a. method overriding) occurs during the runtime of the program, where the methods share the same name but have different implementation. 5. B8 is an engine that provides a runtime environment to drive the Java Code or 5 applications. 6. All methods of an interface are automatically B9. 7. A B10 has the same name as the class. Part III: true-false questions (2 points * 10) 1. An inner class object cannot access the members of the outer class object that created it, including private members. ( ) 2. Overloads can be distinguished by their return type. ( ) 3. A class can only extend a single class, so a class can only implement a single interface. ( ) 4. All classes in Java language contain toString() method. ( ) 5. When calling a method with variable parameters, only multiple parameters can be passed in, not arrays. ( ) 6. Interface method is abstract method in essence, and interface is a special form of abstract class. () 7. HashSet is an unordered collection that rejects duplicates. ( ) 8. The answer to the "System.out.println("abc"+1+2);” is “abc3". () 9. Map stores key-value pairs, which cannot contain duplicate values. ( ) 10. There must be a main method for each Java class. ( )
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply