what is meant by UP& DOWN casting in java?

Answer Posted / javachi

Casting is nothing but data type conversion.
Up casting is the conversion of data type from lower range data type to higher data type eg: int to long, byte to long, int to double etc...
Down casting is vice versa of up casting, here we do type casting from larger value to lower value,
eg: double to byte, long to int etc

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the Propertie sof class?

588


What does \ mean in regex?

626


What is the importance of static variable?

590


Why can't we make a class private in java?

539


What is the difference between inheritance and encapsulation?

597






What is singleton class in ruby?

564


Which are the two subclasses under exception class?

531


What is the difference between and ?

516


What is the use of arraylist in java?

530


Why arraylist is not synchronized in java example?

472


Does variable declaration allocate memory?

587


What is a arraylist in java?

562


What is console based application in java?

546


Does a class inherit the constructors of its superclass in java programming?

532


What are design patterns and please explain?

575