Does the object type known during compilation in Java?.

Ads
 

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
Method is undefined for the type Object(org.apache.jasper.JasperException)
java Compilation
java Compilation
java Compilation
compilation problem
compilation problem
Casting (Type Conversion)
compilation fail
compilation error
compilation errors
object
Main memory is also known as
Java compilation error - Java Beginners
java compilation error - Hibernate
command prompt is compilation is not working
noise during print screen
compilation error - Java Beginners
Java Compilation - Java Beginners
java is pure object oriented
object as argument
type casting
Type casting in java
Object in java - Java Beginners
java compilation error - Java Beginners
a problem during add jar file javax.annotation.Resource
Type Comparison Operator
Java type casting
Does hibernate support polymorphism?

Ads