What is the correct answer?


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.

Correct Answer :

B. Creates text object that can hold 10 columns of text.

Related Questions

Which of the following will produce a value of 10 if x = 9.7? Frames and applets cannot be used together in the same program. Members of a class specified as private are accessible only to the methods… We can over load methods with differences only in their return type. Any class may be inherited by another class in the same package. We can add more than one class(es) at the time of compilation Java Beans. The break statement is required in the default case of a switch selection… In RMI before running the client program we must start RMI Registry. JdbcOdbcDriver is an object of Object class A package is a collection of Submit button always fires doPost(...) Which of the following are the wrapper classes? A final class may not have any abstract method. Given the codeString s = new String("abc");Which of the following calls… For all insert, update, delete, query operations on a database, ResultSet… Which of the following are keywords? putValue(...) method takes _____________________- Which of the following methods can be used to draw the outline of a square? JSP files creates ________________ When we invoke repaint () for a Component, the AWT invokes the method: An EJB is a server-side component that encapsulates the business logic… Consider the following class definition.Class Student extends String{}What… The setBackground() method is part of the class A method declared as static can not access non-static class members. What is wrong in the following class definitions? abstract class… executeUpdate(------------) returns ___________ The keywords reserved but not used in the initial version of Java re: Two methods cannot have the same name in Java. To delete a file, we can use an instance of class file. DataInput is