View Count: 0
Duration: 67 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 62 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 71 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 52 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 74 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Sorry!For this module there is no Sample Code.
Sorry!For this module there is no Assignments.
Question No: 1 of 17
Which of these statement is incorrect? 
Options:
  1. Public method is accessible to all other classes in the hierarchy
  2. Public method is accessible only to subclasses of its parent class
  3. Public method can only be called by object of its class.
  4. Public method can be accessed by calling object of the public class.
View Answer/Explanation:
a
Explanation:

Question No: 2 of 17
Which of the following statement is correct? 
Options:
  1. Constructor is called at the time of declaration of an object.
  2. A constructor is called at the time of use of an object.
  3. A constructor is called at the time of declaration of a class.
  4. A constructor is called at the time of use of a class.
View Answer/Explanation:
a
Explanation:

Question No: 3 of 17
What is the output of the following program?
Note: The new keyword is missing in the object creation! Will the following code work?

class Test

{

int i;

float j;

public static void main(String[] args)

{

Test t1= Test();

System.out.println("t1.i="+t1.i+", t1.j="+t1.j);

}

} 
Options:
  1. t1.i=0, t1.j=0
  2. t1.i=0, t1.j=0.0
  3. Compilation Error
  4. Run Time Error
View Answer/Explanation:
c
Explanation:
Explanation-new is missing Correct Syntax to create an object is: Test t1= new Test();

Question No: 4 of 17
Which of these operators is used to allocate memory for an object? 
Options:
  1. malloc
  2. alloc
  3. new
  4. give
View Answer/Explanation:
c
Explanation:
Explanation: Operator new dynamically allocates memory for an object and returns a reference to it. This reference is address in memory of the object allocated by new.

Question No: 5 of 17
Which operator is used by Java run time implementations to free the memory of an object when
it is no longer needed? 
Options:
  1. delete
  2. free
  3. new
  4. None of the mentioned
View Answer/Explanation:
d
Explanation:
Explanation-Java handles deallocation of memory automatically, we do not need to explicitly delete an element. Garbage collection only occurs during execution of the program. When no references to the object exist, that object is assumed to be no longer needed, and the memory occupied by the object can be reclaimed.

Question No: 6 of 17
What is the stored in the object obj in following lines of code?

Honda obj; 
Options:
  1. Memory address of allocated memory of object.
  2. Garbage
  3. Any arbitrary pointer
  4. NULL
View Answer/Explanation:
d
Explanation:
Explanation-Memory is allocated to an object using new operator. Honda obj; just declares a reference to object, no memory is allocated to it hence it points to NULL.

Question No: 7 of 17
In given following code what will be the variable assigned to the variable forth char if the code

is executed?
String str=new String(“java”);

Char forthChar=str.charAt(4); 
Options:
  1. 'a'
  2. 'v'
  3. throws StringIndexOfBoundException
  4. null
View Answer/Explanation:
c
Explanation:
Explanation-Here 'J' starts with position zero and ends at 'A' having position three.the method is trying to access unknown position

Question No: 8 of 17
Which are used to produce a programming environment that supports the development of far

more robust and scalable programs than does the process-oriented? 
Options:
  1. Encapsulation, Polymorphism,Inheritance and Abstraction.
  2. Encapsulation, Polymorphism
  3. Inheritance and Polymorphism
  4. Exception
View Answer/Explanation:
a
Explanation:

Question No: 9 of 17
Which variables are created when an object is created with the use of the keyword 'new' and

destroyed when the object is destroyed? 
Options:
  1. local variable
  2. instance variable
  3. static variable
  4. none of the above
View Answer/Explanation:
b
Explanation:
Explanation- it is totally based on object state.

Question No: 10 of 17
In Java, objects will expose variables and functions in these variables are also known as? 
Options:
  1. Fields
  2. Methods
  3. Fields & Methods
  4. none of the above
View Answer/Explanation:
a b
Explanation:
Explanation- it is totally based on object state.

  1