Java Classes Object and methods

Java Classes Object and methods Quiz

1
Created on By 52fd849a905aedf0249df9e69d61b55a?s=32&d=mm&r=gwefru

Classes , Object and Methods

TEST YOUR  SKILLS

1 / 10

Which of these class is superclass of every class in Java?

2 / 10

Object is ____________class?

3 / 10

What will be the output of following program?

class Rectangle

{

in length, width;

Rectangle(int x, int y);

{

length = x;

width = y;

}

int rectArea()

{

return (length * width);

}

class rectangleArea

{

public static void main (String args[])

{

Rectangle react1= new Rectangle(15, 10);

int areal = react1 rectArea();

System.out.printLn("Area = "+ area1);

}

}

4 / 10

A Default constructor has

5 / 10

A subclass is also called as

6 / 10

Which of these constructor is used to create empty String object?

7 / 10

The keyword used to create a new object in Java is __________________.

8 / 10

Choose the correct statement about java main method.

9 / 10

Creating an object from a class is also called______________.

10 / 10

A java class can contain_______.

Your score is

The average score is 90%

0%

Leave a Reply

Your email address will not be published. Required fields are marked *