Does the object type known during compilation in Java?.

Does the object type known during compilation in Java?.

class A {

}

class B extends class A {

}

class checkType

{

public static void main(String[] args)

 {
   A ObjA = new B();/// Here ObjA is of type A--> this fact is  known at compile time.
                        But here ObjA is pointing to new B(). Will this be known at  
                        compile time or run time.
 }

}

View Answers









Related Tutorials/Questions & Answers:
Does the object type known during compilation in Java?.
Does memory for Class or Object?
Advertisements
Object does not support proprty or method
Reference type Vs Object type. - Java Beginners
object retun type - Java Beginners
Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type 'System.String'
AttributeError: type object 'object' has no attribute 'dtype'
AttributeError: type object 'object' has no attribute 'dtype'
Method is undefined for the type Object(org.apache.jasper.JasperException)
Convert an Integer type object to a String object
I retrieve a String or other object type without creating a new object each time.
PHP Type Hinting
PHP Object Type
java Compilation
java Compilation
java Compilation
Casting (Type Conversion)
Convert Object to Int
Compare a double type buffer to another object
object
Main memory is also known as
compilation problem
compilation problem
Convert Object to Double
noise during print screen
PHP Object Reference
compilation fail
compilation error
compilation errors
type casting
Object Oriented Programming II
java compilation error - Java Beginners
Access Static Member Of The Class Through Object
java is pure object oriented
compilation error - Java Beginners
Type casting in java
object as argument
a problem during add jar file javax.annotation.Resource
java object - Java Beginners
: Java Compilation error. - Java Beginners
compilation errors - Swing AWT
Object in java - Java Beginners
compilation error - Java Beginners
java compilation error - Applet
java compilation error - Hibernate
Type Comparison Operator
Java type casting
java compilation error - Development process
Does hibernate support polymorphism?
java compilation error - JSP-Servlet

Ads