Posts

Showing posts from June, 2014
Some Viva Questions and Answers: What is OOP? A: Object-oriented programming (OOP) is a programming paradigm that represents concepts as “objects” that have data fields (attributes that describe the object) and associated procedures known as methods. Is Java an Object Oriented language? A: Yes. What is significance of import java.io.* in your program? A: The line imports all the classes of the java.io package into the current program. Give some examples of packages. A: java.util, java.lang etc. Why did you write java.util package? (only if you use classes like Scanner or StringTokenizer) A: To include the functions of the Scanner or StringTokenizer class from the java.util package. What is a class? A: A class is a blueprint or prototype from which objects are created. What is an object? A: An object is an instance of a class. How to create an object? A: Objects of a class can be created as by declaring it and then instantiating it using the ‘new’ ...