If possible with explanation(even one line if time wont permit you to write elaborately (please explain so that i can get your way of thinking to the query )
TRUE OR FALSE (T/F) WRITE ANSWERS WITH QUESTION NUMBERS
1)It is an error to have a method with the same
signature in both the superclass and subclass
2)A constructor must always invoke its superclass constructor in its first statement
3)Subclasses of an abstract class that do not provide an implementation of an abstract method are also abstract
4)All methods in abstract class must be declared abstract
5)when the
string objects are compared with == ,the result is true if the strings contain the same values
6)A string object cant be modified after it is created
7)A catch can have comma separated multiple arguments
8)It is an error to catch the same type of exception in two different blocks
assosciated with a particular try block
9)A final class may not have any abstract methods
10)
java always provides a default constructor to a class
11)when present , package must be the first non comment statement in the file
12)I)The import statement is always the first non comment statement in a java program file
II)int 0xCAFE=2? EXPLAIN
13)I)objects are passed to a method by use of call - by - reference
II)IS -10>>>2=1073741821.EXPLAIN ?
----------------------------------------------------------------------------------------------------------------------------------------------
MULTIPLE CHOICE .CHOOSE A,B,C,D ...
OBSERVE CAREFULLY YOU MAY ALSO FIND MORE THAN ONE ANSWER
THEN WRITE THAT MANY OPTIONS
14)What will be the result of the expression 9|9
a)1b)18c)9d)none of the above
15)consider the following statements
int x=10,y=15;
x=(x<y)?(y+x)

y-x);
what will be the value of x after executing the statements
16)which of the following operators are overloaded for string objects
a)-b)+c)+=d)&
17)which of the following are illegal loop constructs ?
a.while (int i >0)
{
i--;
other statements ;
}
b.for (int i=10,int j=0;i+j>5;i=i-2,j++)
{
body of statements
}
18)which of the following contol expressions are valid for an if statement
a.an integer expression
b.a boolean expression
c.either a or b
d.neither a nor b
19) In the following code snippet , which lines of the code contain error
1)int j=0;
2)while (j<10){
3)j++;
4)if (j==5)continue loop ;
5)System.out.println("j is "+j);
}
a.line 2 .b.line 3
c.line 4.d.line 5 e.none of the above
20)which keyword can protect a class in a package from accessibility by the classes outside the package ?
a.private b.protected c.final d.dont use any keyword(default)
21)we would like to make a member of a class visible in all subclasses regardless of what package they are in
which one of the following keywords would achieve this a.private b.protectedc.public d.private protected
22)class class a
{
public static void main(String args[])
{
classb b = classb();
}
classa (int x)
{}
}
class classb extends classa
{}
what will happen when we compile and run this code ?
a.compile and run successfully
b.error classa does not define a no argument constructor
c.error classb does not define a no argument constructor
d.error there is no code in the class classb
e.error there is nod code in the constructor classa (int x)
23)what does the following line of code do ?
TextField text = new TextField (10);
a.creates text object that can hold 10 rows of text
b.creates text object that can hold 10 columns of text
c.creates the object text and initializes it with the value 10
d.The code is illegal
24)what is java_g used for
a.using the jdb tool
b.executing a class with optimization turned off
c.To provide information about deprecated methods
d. none of the above
25)which of the following command lines options generates documentation for all classes and methods
a.-protected.
b.-public
c.-private
d.-verbose
e.-encoding
26)which of the following represents legal flow control statements
a.break;
b.break();
c.continue outer ;
d.continue (inner );
e.return ;
f.exit ();