4..Consider the following code snippet String river = new String(Columbia); System.out.println(river.length());
What is printed? A. 6 B. 7 C. 8 D. Columbia
5. A constructor A. must have the same name as the class it is declared within. B. is used to create objects. C. may be declared private D. A and B E. A, B and C
6.java program checks if a number is armstrong or not.
Answers Set 1 1. The main components of Android are: 1) Activity 2) Intent 3) Service 4) Broadcast receiver 5) Content Provider
2. java 3. Answer: Google 4.8 5.E
SET 2 1.What is different between a Java applet and a Java application?
A. An application can in general be trusted whereas an applet can't. B. An applet must be executed in a browser environment. C. An applet is not able to access the files of the computer it runs on D. (A), (B) and (C). E. None of the above
2.What is garbage collection in the context of Java?
A. The operating system periodically deletes all of the java files available on the system. B. Any package imported in a program and not used is automatically deleted. C. When all references to an object are gone, the memory used by the object is automatically reclaimed. D. The JVM checks the output of any Java program and deletes anything that doesn't make sense.
3.What is byte code in the context of Java? A. The type of code generated by a Java compiler B. The type of code generated by a Java Virtual Machine C. It is another name for a Java source file D. It is the code written within the instance methods of a class.
4.Which of the following is used for storage in android? 1. Sql 2. Sqlite 3. Db2 4. OpenGL
5.Library used for graphics in android 1. FreeType 2. OpenGL 3. Sqlite 4. SSL
6.Write a program to add to matrices and print its output
Set 2 Answers: 1.D 2.c 3.A 4.2 5.2
Set 3 1.Which is a valid keyword in java? A. Interface B. string C. Float D. unsigned
2.What is garbage collection in the context of Java? A. The operating system periodically deletes all of the java files available on the system. B. Any package imported in a program and not used is automatically deleted. C. When all references to an object are gone, the memory used by the object is automatically reclaimed. D. The JVM checks the output of any Java program and deletes anything that doesn't make sense.
3.What is byte code in the context of Java? A. The type of code generated by a Java compiler B. The type of code generated by a Java Virtual Machine C. It is another name for a Java source file D. It is the code written within the instance methods of a class.
2.Which of the following statements describe the Android SDK Emulator? The Emulator does not need to be restarted each time an app is deployed to it. Apps need not be signed to be deployed in the Android Market Only one Emulator can run at once. The Emulators local IP address is the same as the host computer it runs on.
3.What is apk file? Android programming package Android application package Android application program Application android packagea 4.Which one of these lists contains only Java programming language keywords? A. class, if, void, long, Int, continue B. goto, instanceof, native, finally, default, throws C. try, virtual, throw, final, volatile, transient D. strictfp, constant, super, implements, do E. byte, break, assert, switch, include
5.Which will legally declare, construct, and initialize an array? A. int [] myList = {"1", "2", "3"}; B. int [] myList = (5, 8, 2); C. int myList [] [] = {4,9,7,0}; D. int myList [] = {4, 3, 7};
6.Write a program to print factorial of a number
Set 4 Answers: 1.- It is Android's virtual machine. - It is an interpreter-only virtual machine which executes files in Dalvik Executable (.dex) format. This format is optimized for efficient storage and memory-mappable execution. 2. The correct answers A 3. Ans:2 4.B 5.D