Home
Current Affairs January 2024

What is the correct answer?

4

If you want to assign a value of 99 to the variable year, then which of the following lines can be used within an <applet> tags?

A. number=getParameter(99)

B. <number==99>

C.

D. <param = radius value ==99>

Correct Answer :

C.


Related Questions

What is the correct answer?

4

Consider the following class definitions:
 class maths { 
student student1;
}
class student {
String name;
}

This code represents:

A. an 'is a' relationship

B. a 'has a' relationship

C. both

D. neither

What is the correct answer?

4

Two methods cannot have the same name in Java.

A. True

B. False

What is the correct answer?

4

JSP files creates ________________

A. html files

B. html files and java files

C. java files and class files

D. None of the above.

What is the correct answer?

4

Which of the following command lines options generates documentation for all classes and methods?

A. -protected

B. -public

C. -private

D. -encoding

What is the correct answer?

4

For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.

A. True.

B. False.

What is the correct answer?

4

With javadoc, which of the following denotes a javadoc comment?

A. //#

B. /*

C. /**

D. //**

What is the correct answer?

4

The keywords reserved but not used in the initial version of Java re:

A. Synchronized

B. Boolean

C. union

D. goto

What is the correct answer?

4

Every call to wait has a corresponding call to notify that will eventually end the wafting.

A. True

B. False

What is the correct answer?

4

Java always provides a default constructor to a class.

A. True

B. False

What is the correct answer?

4

It is an error to catch the same type of exception in two different catch blocks associated with a particular try block.

A. True

B. False

What is the correct answer?

4

The modulus operator (%) can be used only with Integer operands.

A. True

B. False

What is the correct answer?

4

class.forName(...) creates an instance of java ODBC driver

A. True

B. False

What is the correct answer?

4

A method declared as static can not access non-static class members.

A. True

B. False

What is the correct answer?

4

Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously

A. True

B. False

What is the correct answer?

4

Every method of a final in class is implicitly final.

A. True

B. False

What is the correct answer?

4

Session bean

A. Represents a single client inside the application server

B. Can not be shared

C. Is not persistent

D. Satisfies all of the above conditions

What is the correct answer?

4

The break statement is required in the default case of a switch selection structure.

A. True

B. False

What is the correct answer?

4

The expression (x == y && a<b) is true If either x == y is true or a<b is true.

A. True

B. False

What is the correct answer?

4

Which of the following represent legal flow control statements?

A. break;

B. break();

C. continue(inner);

D. all of the above

What is the correct answer?

4

executeUpdate(------------) returns ___________

A. Nothing

B. Returns a ResultSet object

C. Returns an integer value to show the no. of updated rows

D. None of the above.

What is the correct answer?

4

A thread can make second thread ineligible for execution by calling the suspend (-) method on second thread.

A. True

B. False

What is the correct answer?

4

The use of protected keyword to a member in a class will restrict its visibility as follows:

A. Visibility only in the class and its subclasses in the same package.

B. Visibility only inside the same package.

C. Visibility in all classes in the same package and subclasses in other packages.

D. Visibility only in the class where it is declared.

What is the correct answer?

4

The setBackground() method is part of the class

A. Applet

B. Component

C. Container

D. Object

What is the correct answer?

4

Java is fully object oriented programme.

A. true

B. false

What is the correct answer?

4

Given the code
String s = new String("abc");
Which of the following calls are valid?

A. s.toUpperCase()

B. s.append("xyz")

C. s.setCharAt(1<'A')

D. all of the above

What is the correct answer?

4

In RMI we invoke client method from remote server

A. True

B. False

What is the correct answer?

4

In RMI before running the client program we must start RMI Registry.

A. True.

B. False.

What is the correct answer?

4

In the code below, what data types the variable x can have?

A. byte b1 = 5;

B. byte b2 = 10;

C. x = b1 * b2;

D. int short

What is the correct answer?

4

Which exception is thrown by the read() method of InputStream class?

A. IOException

B. FileNotFoundException

C. ReadException

D. None of the above

What is the correct answer?

4

If m and n are int type variables, what will be the result of the expression
'm % n' when m = -14 and n = -3?

A. 4

B. 2

C. -2

D. -4