class and Object

Ads
 

class and Object

how many classes,References and objects in this following statement....

A a=new B();

View Answers

October 27, 2010 at 2:57 PM

Hi,

In the statement:

A a=new B();

There are 2 classes, Class A and Class B. References : 1 (Object of B is referenced by A) Variable: a

Thanks

Ads









Related Tutorials/Questions & Answers:
Object class in java
Object class in java  want an example and with an explaination about equals() method in object class? Is equals() is similar
Does memory for Class or Object?
Does memory for Class or Object?   Does memory for class(methods & instance variables)allocated without it's object creation?If no,then The main() itself has associated with a class for which there is no instance creation,how
Advertisements
In Java how to get size of class and object?
In Java how to get size of class and object?  In Java how to get size of class and object
In Java how to get size of class and object?
In Java how to get size of class and object?  In Java how to get size of class and object
Can you create an object of an abstract class?
Can you create an object of an abstract class?   Hi, Can you create an object of an abstract class? Thanks
How to access sub class member using super class object
How to access sub class member using super class object  class A{ } class B extends A{ int b=1; } class Test{ public static void main(String args[]) { what to do here to access sub class variable b using super class object
what is the working of JVM when An object is created of a class?
what is the working of JVM when An object is created of a class?  what is the working of JVM when An object is created of a class?   When the JVM creates the instance of your class object,the object instance is stored
Object Class Methods in Java
We are going to discus about Object Class Methods in Java...(), wait(), etc Java object class methods are:- finalize() clone() equals... finalize() method. Object's class finalize method is declared
Limit the Class Object Creation
Limit the Class Object Creation In this section you will learn about how a class object creation can be a restricted to a fix number of times... to restrict the object creation of a class. This is a simple code in Java where I have
how to get session object in simple java class??
how to get session object in simple java class??  i am fallowing... work. 1) GroupDetails.jsp 2) GroupPojo.java (simple pojo class which have setters and getters) 3) GroupServlet.java (a servlet class for control) 4
new operator for creating the object of inner class
new operator for creating the object of inner class  Hi , The folliowing is my code : class Outer { class Inner{ void show... "); } } } class Test { public statis void main(String args
Spring MVC, request object in val;idator class
Spring MVC, request object in val;idator class  Spring MVC validators by default gives you a commandClass object which you can validate. For each... question - How will you get these parameters in the validator class and validate
variables are **called instance variables because they are created** whenever an object of the class is instantiated.
an object of the class is instantiated.  i am new to java and also... instance variables because they are created whenever an object of the class... variables because they are created whenever an object of the class
can we use scanner class,class , object and methods to get output without using constructor ????
can we use scanner class,class , object and methods to get output without using constructor ????  im getting error here..i hav used scanner class... am i getting error here... can we get output using scanner class , object
object
object  is it possible to create object in the same class..?.   Yes, you can. class CreateObject { CreateObject(){ System.out.println("I have an object."); } public static void main(String[] args
Class Loader
; The Java ClassLoader is a an abstract class which extends the Object class. Java... object code. Libraries may include different sorts of objects, while Java class... a file of that name from the file system. Class loader does not create class object
Class
Class, Object and Methods     ... class. Object is the feature of a class which is used for the working... the class, object and it's methods. This program uses the several values
class
is a class to represent a country in medal tally. It has an attribute of country... medals. In this class, you should also define constructors, and assessor, mutator methods. Task 2 MedalTally.java is a class to model a medal tally, containing
Java Object
properties of the class or its group. Java object is an instance of the class. It takes... Java Object         Object is the basic entity of object oriented programming language. Object
Sub-class in java
a super class and subclass definition and achieved through the object creation... Sub-class in java      ... class and subclass. -- Inheritance allows a new class known as the sub-class
constructor or object
constructor or object  object or construct which create first?   A constructor is always created first. Here is an example: class Example { Example(String st){ System.out.println(st); } public
Object slicing
Object slicing  I have a program as bellow: #include<iostream.h> #include<conio.h> class A { public: int x; A() { x=10; } }; class B:public A { protected: int y
Object in java - Java Beginners
is class ,object and instance with example. For example : class raja , raja r = new raja(); ,here raja is class and r is instance . which is object. Object is instance of class , means occurrence of something. Plz explain object
object and method
object and method  a college would like to automate managing courses... if she\he is enrolled in the course construct a UML diagram,class and an application that creates the necessary object
Session Object from request
relevant class. is there any reason for getting session object from request...Session Object from request  Why are we getting session object from request object? Why are we adding cookie object into response object? Why are we
object creation
object creation  when will java object is created? is it at runtime or compiletime
static object array
static object array  static object array   Dynamically call a static variable array class Blog { public static $template = array('content' => 'doodle'); } Blog::$template['content'] = 'bubble'; $class = 'Blog
Object Oriented
Object Oriented  C++ is Purely object oriented or not .Then why java called purely object oriented
wrapper class.
wrapper class.  Write short note on character wrapper class.   Java Character Wrapper class The Character class wraps a value of the primitive type char in an object. An object of type Character contains a single field
Object reference not set to an instance of an object
Object reference not set to an instance of an object  Object reference not set to an instance of an object
Is Java object oriented?
Is Java object oriented?  Hi, Is Java object oriented? Thanks   Hi, Java is object oriented programming language. It is supports OPPS concepts: Object Class Inheritance Polymorphism Abstraction Encapsulation All

Ads