263). Which of these is the method which is executed first before execution of any other thing takes place in a program?

[A]main method
[B]finalize method
[C]static method
[D]private method

Show Answer

264). What is the process of defining more than one method in a class differentiated by parameters?

[A]Function overriding
[B]Function overloading
[C]Function doubling
[D]None of the mentioned

Show Answer

265). Which of these can be used to differentiate two or more methods having the same name?

[A]Parameters data type
[B]Number of parameters
[C]Return type of method
[D]All of the mentioned

Show Answer

267). Which of these statement is incorrect?

[A]Two or more methods with same name can be differentiated on the basis of their parameters data type
[B] Two or more method having same name can be differentiated on basis of number of parameters
[C] Any already defined method in java library can be defined again in the program with different data type of parameters
[D] If a method is returning a value the calling statement must have a variable to store that value

Show Answer

268). What will be the output of the following Java program?
    class box 
    {
        int width;
        int height;
        int length;
        int volume;
        void volume(int height, int length, int width) 
        {
             volume = width * height * length;
        } 
    }    
    class Prameterized_method{
        public static void main(String args[]) 
        {
            box obj = new box();
            obj.height = 1;
            obj.length = 5;
            obj.width = 5;
            obj.volume(3, 2, 1);
            System.out.println(obj.volume);        
        } 
    }

[A]0
[B]1
[C]6
[D]25

Show Answer

269). What will be the output of the following Java program?
    class equality 
    {
        int x;
        int y;
        boolean isequal()
        {
            return(x == y);  
        } 
    }    
    class Output 
    {
        public static void main(String args[]) 
        {
            equality obj = new equality();
            obj.x = 5;
            obj.y = 5;
            System.out.println(obj.isequal);
        } 
    }

[A]false
[B]true
[C]0
[D]1

Show Answer

270). What will be the output of the following Java program?
    class box 
    {
        int width;
        int height;
        int length;
        int volume;
        void volume() 
        {
            volume = width * height * length;
        } 
        void volume(int x) 
        {
            volume = x;
        }
    }    
    class Output 
    { 
        public static void main(String args[]) 
        {
            box obj = new box();
            obj.height = 1;
            obj.length = 5;
            obj.width = 5;
            obj.volume(5);
            System.out.println(obj.volume);        
        } 
    }

[A]0
[B]5
[C]25
[D]26

Show Answer

271). What will be the output of the following Java program?
    class Output 
    {
        static void main(String args[]) 
        {    
             int x , y = 1;
             x = 10;
             if(x != 10 && x / 0 == 0)
                 System.out.println(y);
             else
                 System.out.println(++y);
        } 
    }

[A]1
[B]2
[C]Runtime Error
[D]Compilation Error

Show Answer

272). What will be the output of the following Java program?
    class area 
    {
        int width;
        int length;
        int height;
        area() 
        {
        width = 5;
        length = 6;
        height = 1;
        }
        void volume() 
        {
             volume = width * height * length;
        } 
    }    
    class cons_method 
    {
        public static void main(String args[]) 
        {
            area obj = new area();
            obj.volume();
            System.out.println(obj.volume);
        } 
    }

[A]0
[B]1
[C]25
[D]30

Show Answer