• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

JAVA Constructors and Methods

JAVA Constructors and Methods
In which area of memory, the system stores parameters and local variables whenever a method is invoked?

Storage Area
Heap
Array
Stack

ANSWER DOWNLOAD EXAMIANS APP

JAVA Constructors and Methods
Determine Output:class A{public static void method(int i){System.out.print("Method 1");}public static int method(String str){System.out.print("Method 2");return 0;}}public class Test{ public static void main(String args[]){A.method(5);}}

Method 1
Method 2
Compile time error as final method can't be overloaded
None of these

ANSWER DOWNLOAD EXAMIANS APP

JAVA Constructors and Methods
Which of the modifier can't be used for constructors?

public
protected
static
private

ANSWER DOWNLOAD EXAMIANS APP

JAVA Constructors and Methods
The finalize() method is called just prior to

Before garbage collection.
A variable goes out of scope.
An object or variable goes out of scope.
An object, variable or method goes out of scope.
None of these

ANSWER DOWNLOAD EXAMIANS APP

JAVA Constructors and Methods
class A{ A(String s){} A(){}}1. class B extends A{2. B(){}3. B(String s){4. super(s);5. }6. void test(){7. // insert code here8. }9. }Which of the below code can be insert at line 7 to make clean compilation ?

None of these
A a = new B();
All of these
A a = new A(String s);
A a = new B(5);

ANSWER DOWNLOAD EXAMIANS APP

JAVA Constructors and Methods
The implicit return type of a constructor is

A class object in which it is defined.
None of these
There is no return type.
void

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON JAVA Constructors and Methods

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑