Time Limit: 15000 Time Left 146 13 xu Luu: Attempt 1 Question 11 point) oof ques
ID: 3795743 • Letter: T
Question
Time Limit: 15000 Time Left 146 13 xu Luu: Attempt 1 Question 11 point) oof questions saved which of the following statements about methods is correct? Page method is sequence of instructices that could access the data of an object 2A method name is unique across the entire program e A method can be called on any otnectin any class. o Methods stored in variables 12 15 14 15 17 a Question 120 point) 18 19 What is a local variable? Legend IAvariable that is declared in the header of a class 2) A variable that is declared in the body of the class. Unsaved Response 3 A variable that declared in the header of a method 4 A variable that declared in the body of a method. Info Item 130 point) When arr loral variables initialized?Explanation / Answer
Question-11:
Answer : A method is sequence of instructions that could access the data of the object.
Eg:
class College {
int total_strength;
String college_name;
public void getDetails(){
total_strength = 300;
college_name="Stella Maris";
}
}
Question-12
Answer: Variable that is declared in the body of the method
Eg:
class College {
int total_strength;
String college_name;
public void getDetails(int strength,String name){
int faculties = 120; // Local Variables
total_strength = strength;
college_name=name;
}
}
Question-13:
Local Variables are initialized when method is called.
Eg:
class College {
int total_strength;
String college_name;
public void getFacultyDetails(){
int cse_strength = 40;
int ece_strength = 41;
int eee_strength = 30;
int mech_strength = 25;
}
}
Question-14
Application Programming Interface
API's are used to implement and instantiate the classes and interfaces from the particular package depending upon upon user utiilities on the application.
Eg: Is user want to create a Collection for collecting Objects, then
use, java.util.Collection to do the job.
Question-15: JavaDoc Tool
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.