72.
What will be the output of the following Java program?
class Output 
{
    public static void main(String args[])
    {
        int arr[] = {1, 2, 3, 4, 5};
        for ( int i = 0; i < arr.length - 2; ++i)
            System.out.println(arr[i] + " ");
    } 
}

74.
How can a protected modifier be accessed?

75.
What will be the output of the following Java program?
class string_class 
{
    public static void main(String args[])
    {
        String obj = "I LIKE JAVA";   
        System.out.println(obj.length());
    }
}

77.
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);        
    } 
}

80.
Which of the following statements are incorrect?

Read More Section(Miscellaneous in Java)

Each Section contains maximum 100 MCQs question on Miscellaneous in Java. To get more questions visit other sections.