Friday, 18 February 2011

Java data type questions and answers


Java objective type data type questions and answers




(1)What will be the output of following java program?



class Datatype{

     public static void main(String[] args){

          byte num=(byte)130;

          System.out.print(num);

     }

}











Output: -126



(2)What will be the output of following java program?



class Datatype{

     public static void main(String[] args){

No comments:

Post a Comment