Question: first:: We can provide information to a method via parameters or arguments. Arguments are Select one: a. Global to the objects where they are defined

first:: We can provide information to a method via parameters or arguments. Arguments are

Select one:

a. Global to the objects where they are defined

b. Local to the class

c. Local to the method where they are defined

d. None of these

second ::

In the following code:

public void displayAddress(Address add) {

System.out.println(add.toString());

}

add is an object in memory that belongs to Address class.

true / false ?

third :: In the same java application, every class can have a main method. true false

forth ::

Given the following code snippet:

ArrayList shapes = new ArrayList<>();

Scanner scan1=new Scanner(new FileReader("D:\\AAUJ\\AAA\ adiusInfo.txt")); //This statement is equivalent to Scanner scan1=new Scanner(new FileInputStream("D:\\AAUJ\\AAA\ adiusInfo.txt"));

while(scan.hasNext())

{

double radius;

scan.next();

radius=Double.parseDouble(scan.next());

shapes.add(new Circle(radius));

}

Select one:

a.

The compiler will report an error

b.

None of these

c.

The compiler will report an error if Circle class does not extend Shape class

d.

The compiler will report an error if Shape class does not extend Circle class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!