Declaration and Access Control What can directly access and change the value of the variable qusNo?package com.mypackage;public class Test{ private int qusNo = 100;} Any class. Any class that extends Test. None of these Only the Test class. Any class in com.mypackage package. Any class. Any class that extends Test. None of these Only the Test class. Any class in com.mypackage package. ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control A package is a collection of Editing tools and Interfaces Classes and Interfaces Editing tools Classes Interfaces Editing tools and Interfaces Classes and Interfaces Editing tools Classes Interfaces ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control Name the keyword that makes a variable belong to a class, rather than being defined for each instance of the class. final static abstract native volatile final static abstract native volatile ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control Choose the correct statement. Restriction on static methods are: I. They can only call other static methods.II. They must only access static data.III. They cannot refer this or super in any way. Only (III) (I), (II) and (III) (II) and (III) Only (I) (I) and (II) Only (III) (I), (II) and (III) (II) and (III) Only (I) (I) and (II) ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control Choose all the lines which if inserted independently instead of "//insert code here" will allow the following code to compile:public class Test{ public static void main(String args[]){ add(); add(1);add(1, 2); }// insert code here} static void add(int...args){} static void add(int args...){} static void add(int... args, int y){} void add(Integer... args){} static void add(int[]... args){} static void add(int...args){} static void add(int args...){} static void add(int... args, int y){} void add(Integer... args){} static void add(int[]... args){} ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control Determine Output:class MyClass{ static final int a = 20; static final void call(){ System.out.println("two"); } static{ System.out.println("one"); }}public class Test{ public static void main(String args[]){ System.out.println(MyClass.a); }} 20 one one two one 20 one two 20 20 one one two one 20 one two 20 ANSWER DOWNLOAD EXAMIANS APP