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

Ads









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
Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type 'System.String'
Method is undefined for the type Object(org.apache.jasper.JasperException)
java Compilation
java Compilation
java Compilation
compilation problem
compilation problem
compilation fail
Casting (Type Conversion)
compilation error
compilation errors
Convert Object to Int
object
Main memory is also known as
Convert Object to Double
Java compilation error - Java Beginners
java compilation error - Hibernate
command prompt is compilation is not working
noise during print screen
Java Compilation - Java Beginners
compilation error - Java Beginners
java is pure object oriented
Access Static Member Of The Class Through Object
type casting
object as argument
Type casting in java
Object in java - Java Beginners
java compilation error - Java Beginners

Ads