Fundamentals of Object-Oriented Programming Questions and Answers


Learn tutorial from this Chapter Fundamentals of Object-Oriented Programming
 0

 What is computer ?

 1

 List five major hardware components of a computer.

 2

 What does the acronym "CPU" stand for?

 3

 What unit is used to measure CPU speed?

 4

 What is a bit? What is a byte?

 5

 What is memory for? What does RAM stand for? Why is memory called RAM?

 6

 What unit is used to measure memory size?

 7

 What unit is used to measure disk size?

 8

 What is the primary difference between memory and a storage device?

 9

 What language does the CPU understand?

 10

 What is a Java applet?

 11

 What programming language does Android use?

 12

 What is the Java language specification?

 13

 What is the statement to display the message "Hello world" in a message dialog box?

 14

 Why does the System class not need to be imported?

 15

 Are there any performance differences between the following two import statements?
import javax.swing.JOptionPane;
import javax.swing.*;

 16

 Reformat the following program according to the programming style and documenta- tion guidelines. Use the end-of-line brace style.

 17

 Variables used in a switch statement can be used with which datatypes?

 18

 When parseInt() method can be used?

 19

 Why is String class considered immutable?

 20

 Why is StringBuffer called mutable?

 21

 What is the difference between StringBuffer and StringBuilder class?

 22

 Which package is used for pattern matching with regular expressions?

 23

 java.util.regex consists of which classes?

 24

 What is finalize() method?

 25

 What is an Exception?

 26

 What do you mean by Checked Exceptions?

 27

 Explain Runtime Exceptions?

 28

 Which are the two subclasses under Exception class?

 29

 When throws keyword is used?

 30

 When throw keyword is used?

 31

 How finally used under Exception Handling?

 32

 What things should be kept in mind while creating your own exceptions in Java?

 33

 Define Inheritance?

 34

 When super keyword is used?

 35

 What is Polymorphism?

 36

 What is Abstraction?

 37

 What is Abstract class?

 38

 When Abstract methods are used?

 39

 What is Encapsulation?

 40

 What is the primary benefit of Encapsulation?

 41

 Explain the usage of this() with constructors?

 42

 Explain the following line used under Java Program ? public static void main (String args[ ])

 43

 What is the difference between a Window and a Frame?

 44

 Which package has light weight components?

 45

 What is the difference between the paint() and repaint() methods?

 46

 What is the purpose of File class?

 47

 What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

 48

 Which class should you use to obtain design information about an object?

 49

 What is the difference between static and non-static variables?

 50

 What is Serialization and deserialization?

 51

 What are use cases?

 52

 Explain the use of sublass in a Java program?

 53

 How to add menushortcut to menu item?

 54

 What is synchronization?

 55

 What is the Collections API?

 56

 What is the relationship between clipping and repainting under AWT?

 57

 What are ClassLoaders?

 58

 What will happen if static modifier is removed from the signature of the main method?

 59

 Can a top level class be private or protected?

 60

 Is it necessary that each try block must be followed by a catch block?

 61

 When a thread is created and started, what is its initial state?

 62

 What is the Locale class?

 63

 What are synchronized methods and synchronized statements?

 64

 What is runtime polymorphism or dynamic method dispatch?

 65

 What is Dynamic Binding(late binding)?

 66

 What are the advantages of ArrayList over arrays?

 67

 Why deletion in LinkedList is fast than ArrayList?

 68

 How do you decide when to use ArrayList and LinkedList?

 69

 What is a Values Collection View ?

 70

 What is dot operator?

 71

 Where and how can you use a private constructor?

 72

 What is type casting?

 73

 What is the difference between the >> and >>> operators?

 74

 Which method of the Component class is used to set the position and size of a component?

 75

 Define canvas?

 76

 Define Network Programming?

 77

 What is a Socket?

 78

 Advantages of Java Sockets?

 79

 Disadvantages of Java Sockets?

 80

 Which class is used by server applications to obtain a port and listen for client requests?

 81

 Which class represents the socket that both the client and server use to communicate with each other?

 82

 Why Generics are used in Java?

 83

 What environment variables do I need to set on my machine in order to be able to run Java programs?

 84

 If System.exit (0); is written at the end of the try block, will the finally block still execute?


Share Me:

Visit Our Fb Page: