Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

The company encourages a balance between work and personal life.

Answered: 1 week ago