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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started