The class string belongs to ................... package.
A) java.awt
B) java.lang
C) java.applet
D) java.string

2 Answers

Answer :

D) java.string

Answer :

B) java.lang

Related questions

Description : ............... package is used by compiler itself. So it does not need to be imported for use. A) java.math B) java.awt C) java.applet D) java.lang

Last Answer : D) java.lang

Description : All java classes are derived from A) java.lang.Class B) java.util.Name C) java.lang.Object D) java.awt.Window

Last Answer : D) java.awt.Window

Description : State true of false. i) AWT is an extended version of swing ii) Paint( ) of Applet class cannot be overridden A) i-false, ii-false B) i-false,ii-true C) i-true, ii-false D) i-true, ii-true

Last Answer : A) i-false, ii-false

Description : Which is the root class of all AWT events A) java.awt.ActionEvent B) java.awt.AWTEvent C) java.awt.event.AWTEvent D) java.awt.event.Event

Last Answer : B) java.awt.AWTEvent

Description : State true or false. i) Jpanel is a class included in awt package. ii) Anonymous classes are mostly used for event handling. iii) Names of anonymous classes must be unique iv) JOptionPane is an inner class A) i-false ... ) i-false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : C) i-false, ii-true, iii-false, iv-false

Description : What is meaning of java.lang.IllegalArgumentException There is no GcmTaskService component registered within this package. Have you extended GcmTaskService correctly at com.Google.android.gms.common.i?

Last Answer : You have a Java error in one of your Java subroutine calls. It looks as though an external library has not been specified.

Description : State true or false. i) init() is called after start() in applet ii) applets are used for networking iii) inheritance is a part of Java Foundation Classes iv) final does not prevent inheritance A) i-true, ii- ... C) i-true, ii-true, iii-true, iv-true D) i-true, ii-false, iii-false, iv-false

Last Answer : B) i-false, ii-false, iii-false, iv-false

Description : In order to run JSP .................... is required. A) Mail Server B) Applet viewer C) Java Web Server D) Database connection

Last Answer : C) Java Web Server

Description : Which one of the following is correct? (A) Java applets cannot be written in any programming language (B) An applet is not a small program. (C) An applet can be run on its own. (D) Applets are embedded in another applications. 

Last Answer : (D) Applets are embedded in another applications.

Description : Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100) x = CBSE (x +10); return (x - 1); } public static void main (String[] args){ System.out.print(First.CBSE(60)); } } What does this program print? (1) 59 (2) 95 (3) 69 (4) 99

Last Answer : (2) 95 

Description : In java, string is a ............. A) primitive data type B) abstract data type C) combination of boolean D) None of the above

Last Answer : B) abstract data type

Description : What is the default java package?

Last Answer : A: java.lang

Description : Why did you write java.util package? (only if you use classes like Scanner or StringTokenizer)

Last Answer : A: To include the functions of the Scanner or StringTokenizer class from the java.util package.

Description : Which method will a web browser call on a new applet? A) main method B) destroy method C) execute method D) init method

Last Answer : D) init method

Description : Can I set a 'limit' on an integer value in a java applet?

Last Answer : At the beginning of the function, always check to see if ‘nowplaying’ is > 9. If it is, set it to 0 and then have the function run normally. I’m familiar with C++, so I can’t really help you with the syntax, but this should be pretty easy.

Description : Differentiate between Java Applet and Java Application

Last Answer : Sr. No. Java Applet Java Application 1 Applets run in web pages  Applications run on standalone systems. 2 Applets are not full featured application programs. Applications ... file system and resources. 7 Applets are event driven Applications are control driven.

Description : Which of the following methods belong to the string class? A) length( ) B) compare To ( ) C) equals ( ) D) All of them

Last Answer : D) All of them

Description : Which of the following methods belong to the string class? A) length( ) B) compare To ( ) C) equals ( ) D) All of them

Last Answer : D) All of them

Description : Each method in a java class must have a unique name . A) Not necessary B) True C) False D) None of the above

Last Answer : A) Not necessary

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.

Description : The concept of multiple inheritance is implemented in Java by A) extending two or more classes B) extending one class and implementing one or more interfaces C) implementing two or more interfaces D) both B and C

Last Answer : D) both B and C

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.

Description : The concept of multiple inheritance is implemented in Java by A) extending two or more classes B) extending one class and implementing one or more interfaces C) implementing two or more interfaces D) both B and C

Last Answer : D) both B and C

Description : State true or false for Java Program. i) Data members of an interface are by default final ii) An abstract class has implementations of all methods defined inside it. A) i-false, ii-false B) i-false, ii-true C) i-true, ii-false D) i-true, ii-true

Last Answer : C) i-true, ii-false

Description : State true or false for Java Program. i) All class variables are instance variables ii) All protected methods are friendly methods A) i-false, ii-false B) i-false, ii-true

Last Answer : B) i-false, ii-true

Description : Native – protocol pure Java converts ……….. into the ………… used by DBMSs directly. A) JDBC calls, network protocol B) ODBC class, network protocol C) ODBC class, user call D) JDBC calls, user call

Last Answer : A) JDBC calls, network protocol

Description : Which of the following statement(s) with regard to an abstract class in JAVA is/are TRUE? I. An abstract class is one that is not used to create objects. II. An abstract class is designed only to act as a base class ... by other classes. (1) Only l (2) Only II (3) Neither I nor II (4) Both l and II

Last Answer : Both l and II

Description : Can a package be called as a class?

Last Answer : A: Yes, Package is actually a class present in java.lang package.

Description : State true of false. i) Public can only be assigned to class ii) Protected protects a statement iii) Protected method is never accessible outside the package iv) Friendly variable may be accessible outside class A) i- ... -false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : C) i-false, ii-true, iii-false, iv-false

Description : In classful addressing, the IP address 190.255.254.254 belongs to (A) Class A (B) Class B (C) Class C (D) Class D

Last Answer : (B) Class B

Description : In IPV 4, the IP address 200.200.200.200 belongs to (A) Class A (B) Class B (C) Class C (D) Class D

Last Answer : (C) Class C

Description : Explain the purpose of pow() method with the help of suitable java code. Also mention that pow() method belongs to which class? -Technology

Last Answer : pow() method, a mathematical method, helps in calculating the power of any number.For example:int num=2,power=4;int ans=Math.pow(num,power);t1.setText(''+ans);The above code will calculate the value of 24 and will give answer 16.pow() method belongs to math class.

Description : Which of the following does not have a super class: a) System b) Lang c) Exception d) Object e) None of The Above

Last Answer : d) Object

Description : In what way is a file more flexible than a String?

Last Answer : Ans: A file is stored permanently in a storage device.It is easy to access a file whenever required. On the other hand, a string is stored temporarily in RAM, and the contents of a string will be erased automatically when the power is switched off or when the program execution is terminated.

Description : Why is the ‘S’ of String capital?

Last Answer : A: Since String is a class.

Description : Is it compulsory to write String args[] when running a program in BlueJ?

Last Answer : A: No it is not compulsory when we are running it in BlueJ. But normally (in all other cases) it is always better to have it, as the JVM looks for the main method with a String array as a parameter.

Description : Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters? A. cat emp[!0-9] B. more [emp][!0-9] C. cat emp[x-z]

Last Answer : A. cat emp[!0-9]

Description : Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3? A. chmod u+x emp[l-3] B. chmod 777 emp* C. chmod u+r ??? emp D. chmod 222 emp? E. None of the above

Last Answer : A. chmod u+x emp[l-3]

Description : Which command is used to copy all files having the string chap and any two characters after that to the progs directory? A. cp chap?? progs B. cp chap* progs C. cp chap[12] /progs/*.*

Last Answer : A. cp chap?? progs

Description : What would happen if "String[]args" is not included as argument in the main method. A) No error B) Compilation error C) Program won't run D) Program exit

Last Answer : C) Program won't run

Description : ………… function writes a string of text to a window. A) cputs () B) put () C) gets () D) tputs ()

Last Answer : A) cputs ()

Description : The ..................... is essentially used to search for patterns in target string. A) Like Predicate B) Null Predicate C) In Predicate D) Out Predicate

Last Answer : A) Like Predicate

Description : Data items grouped together for storage purposes are called a A) record B) title C) list D) string

Last Answer : A) record

Description : To remove string “hello” from list1, we use which command ? a) list1.remove(“hello”) b) list1.remove(hello) c) list1.removeAll(“hello”) d) list1.removeOne(“hello”)

Last Answer : d) list1.removeOne(“hello”)

Description : The output of executing string.ascii_letters can also be achieved by: a) string.ascii_lowercase_string.digits b) string.ascii_lowercase+string.ascii_upercase c) string.letters d) string.lowercase_string.upercase

Last Answer : d) string.lowercase_string.upercase

Description : Which is the correct statement(s) for Non Recursive predictive parser? S1: First(α) = {t | α => * t β for some string β } => *tβ S2: Follow(X) = { a | S => * αXa β for some strings ... and S2 is correct. (C) S1 is correct and S2 is incorrect. (D) Both statements S1 and S2 are correct. 

Last Answer : (D) Both statements S1 and S2 are correct.

Description : Which of the following derivations does a top-down parser use while parsing an input string ? The input is scanned from left to right. (A) Leftmost derivation (B) Leftmost derivation traced out in reverse (C) Rightmost derivation traced out in reverse (D) Rightmost derivation

Last Answer : (A) Leftmost derivation

Description : Consider a program that consists of 8 pages (from 0 to 7) and we have 4 page frames in the physical memory for the pages. The page reference string is :  1 2 3 2 5 6 3 4 6 3 7 3 1 5 3 6 3 4 2 4 3 4 5 ... to fill available page frames with pages): (A) 9 and 6 (B) 10 and 7 (C) 9 and 7 (D) 10 and 6

Last Answer : (B) 10 and 7

Description : The control string in C++ consists of three important classifications of characters (A) Escape sequence characters, Format specifiers and Whitespace characters (B) Special characters, White-space ... and Non-white space characters (D) Special characters, White-space characters and Format specifiers

Last Answer : (C) Format specifiers, White-space characters and Non-white space characters