Blog is under construction. Blog is under construction.

Wednesday, 8 August 2012

What are the other ways to create an object other than creating as new object?

Q: How to create an object? What are the other ways to create an object other than creating as new object?Answer:Creating an Object:As mentioned previously a class provides the blueprints for objects. So basically an object is created from a class. In java the new key word is used to create new objects.There are three steps when creating an object from a class:·         Declaration . A variable declaration with a variable name with an object type.·         Instantiation...

Interview Questions on JAVA Classes and Objects- Part 1

Interview Questions on JAVA Classes and Objects- Part 1 Q: What is Class and Object?Answer:Java is an Object Oriented Language. As a language that has the Object Oriented feature Java supports the following fundamental concepts:Polymorphism Inheritance Encapsulation Abstraction Classes Objects Instance Method In this chapter we will look into the concepts Classes and Objects.·       Object - Objects have states and behaviors. Example: A dog has states-color, name, breed as well as behaviors -wagging, barking,...

Explain about JVM ARchitecture?

How the Java Virtual Machine (JVM) Works? The Java virtual machine is called "virtual" because it is an abstract computer defined by a specification. To run a Java program, you need a concrete implementation of the abstract specification. This chapter describes primarily the abstract specification of the Java virtual machine. To illustrate the abstract definition of certain features, however, this chapter also discusses various ways in which those...