Java Programming Test (Random Questions) - Computer Science & Engineering
| Marks : | ||
| Total number of questions | : | |
| Number of answered questions | : | |
| Number of unanswered questions | : | |
Instruction:
| 1. | void start() { When is the B object, created in line 3, eligible for garbage collection? |
|||||||||||
Your Answer: Option Correct Answer: Option D Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 2. | Which two cause a compiler error? 1 float[ ] f = new float(3); 2 float f2[ ] = new float[ ]; 3 float[ ]f1 = new float[3]; 4 float f3[ ] = new float[3]; 5 float f5[ ] = {1.0f, 2.0f, 2.0f}; |
|||||||||||
Your Answer: Option Correct Answer: Option D Explanation: (1) causes two compiler errors ( '[' expected and illegal start of expression) because the wrong type of bracket is used, ( ) instead of [ ]. The following is the correct syntax: float[ ] f = new float[3]; (2) causes a compiler error ( '{' expected ) because the array constructor does not specify the number of elements in the array. The following is the correct syntax: float f2[ ] = new float[3]; (3), (4), and (5) compile without error. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 3. | Which of the following are loaded into main memory when the computer is booted? |
||||||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 4. | Which of the following statements is correct about the C#.NET code snippet given below? class Sample |
||||||||||||||
Your Answer: Option Correct Answer: Option E Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 5. | A key: |
|||||||||||
Your Answer: Option Correct Answer: Option C Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 6. | Your network is configured as shown in the exhibit. "Engineering! and Salesl have DHCP installed up them." All the servers are Windows 2000 Server computers that use TCP/IP as the only network protocol. The sales department uses one subnet and has servers named Salesl and Sales2. The engineering department uses another subnet and has servers named Engineeringl and Engineering2. Salesl and Engineeringl are configured to act as DHCP servers. The router that joins the two subnets is not RFC 1542 compliant and does not support DHCP/BOOTP relay. You want to allow Salesl and Engineeringl to support client computers on each other's subnets. What should you do? |
||||||||||||||
Your Answer: Option Correct Answer: Option C Explanation: No answer description available for this question. Let us discuss. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 7. | Which of the following are advantages of using NAT?
|
|||||||||||
Your Answer: Option Correct Answer: Option D Explanation: NAT is not perfect, but there are some advantages. It conserves global addresses, which allow us to add millions of hosts to the Internet without "real" IP addresses. This provides flexibility in our corporate networks. NAT can also allow you to use the same subnet more than once in the same network without overlapping networks. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 8. | Declare the following statement? "A pointer to an array of three chars". |
|||||||||||
Your Answer: Option Correct Answer: Option D Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 9. | Which of the following statements is correct about the C#.NET program given below if a value "ABCD" is input to it? using System; |
||||||||||||||
Your Answer: Option Correct Answer: Option D Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 10. | What servlet processor was developed by Apache Foundation and Sun? |
|||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 11. | What command is used to stop RIP routing updates from exiting out an interface but still allow the interface to receive RIP route updates? |
|||||||||||
Your Answer: Option Correct Answer: Option C Explanation: The (config-router)#passive-interface command stops updates from being sent out an interface, but route updates are still received. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 12. | Which three are methods of the Object class? 1 notify(); |
|||||||||||
Your Answer: Option Correct Answer: Option C Explanation: (1), (2), and (6) are correct. They are all related to the list of threads waiting on the specified object. (3), (5), (7), and (8) are incorrect answers. The methods isInterrupted() and interrupt() are instance methods of Thread. The methods sleep() and yield() are static methods of Thread. D is incorrect because synchronized is a keyword and the synchronized() construct is part of the Java language. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 13. | Who made the statement "if a robot can do a job, a person should not be doing it"? |
||||||||||||||
Your Answer: Option Correct Answer: Option B Explanation: No answer description available for this question. Let us discuss. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 14. | The 2's complement of a binary no. is obtained by adding.....to its 1's complement. |
||||||||||||||
Your Answer: Option Correct Answer: Option B Explanation: No answer description available for this question. Let us discuss. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 15. | In order for an instance of a derived class to completely take over a class member from a base class, the base class has to declare that member as |
||||||||||||||
Your Answer: Option Correct Answer: Option C Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 16. | Which of the following is/are legal method declarations? 1 protected abstract void m1(); 2 static final void m1(){} 3 synchronized public final void m1() {} 4 private native void m1();
|
|||||||||||
Your Answer: Option Correct Answer: Option D Explanation: All the given statements are legal declarations. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 17. | What is the port number for NNTP? |
|||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 18. | Which of the following gets called when an object is being created? |
|||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 19. | What does fp point to in the program ? |
|||||||||||
Your Answer: Option Correct Answer: Option B Explanation: The fp is a structure which contains a char pointer which points to the first character of a file. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 20. | Which of the following improves a query's processing time? |
|||||||||||
Your Answer: Option Correct Answer: Option D Explanation: No answer description available for this question. Let us discuss. Learn more problems on : Java Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
Java Programming Test (Random Questions) - Computer Science & Engineering
