Class-and-object

Question 1
What is the output of the following JAVA program ?
Class Test {
   public static void main(String[] args) {
       Test obj = new Test();
       obj.start();
   }
   void start() {
       String stra = ”do”;
           String strb = method(stra);
       System.out.print(“: ”+stra + strb);
   }
   String method(String stra) {
       stra = stra + ”good”;
       System.out.print(stra);
       return“ good”;
   }
}
A
dogood : dogoodgood
B
dogood : gooddogood
C
dogood : dodogood
D
dogood : dogood
Question 2
The memory occupied by an object type of data in VB is
A
1 byte
B
2 byte
C
4 byte
D
8 byte
Question 2 Explanation: 

There are 2 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access