

MCQOPTIONS
Saved Bookmarks
This section includes 1671 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
451. |
Which of the following is true about File I/O in Node applications? |
A. | Node implements File I/O using simple wrappers around standard POSIX functions. |
B. | Node File System (fs) module should be imported for File I/O opearations. |
C. | Both of the above. |
D. | None of the above. |
Answer» D. None of the above. | |
452. |
Which of the following algorithm is used by Google to determine the importance of a particular page ? |
A. | SVD |
B. | PageRank |
C. | FastMap |
D. | All of the mentioned |
Answer» C. FastMap | |
453. |
Which two statements describe the IP address 10.16.3.65/23? 1. The subnet address is 10.16.3.0 255.255.254.0. 2. The lowest host address in the subnet is 10.16.2.1 255.255.254.0. 3. The last valid host address in the subnet is 10.16.2.254 255.255.254.0. 4. The broadcast address of the subnet is 10.16.3.255 255.255.254.0. |
A. | 1 and 3 |
B. | 2 and 4 |
C. | 1, 2 and 4 |
D. | 2, 3 and 4 |
Answer» C. 1, 2 and 4 | |
454. |
In domain structure what is Access-right equal to ? |
A. | Access-right = object-name, rights-set |
B. | Access-right = read-name, write-set |
C. | Access-right = read-name, execute-set |
D. | Access-right = object-name, execute-set |
Answer» B. Access-right = read-name, write-set | |
455. |
The wait operation of the semaphore basically works on the basic _______ system call. |
A. | stop() |
B. | block() |
C. | hold() |
D. | wait() |
Answer» C. hold() | |
456. |
You use the $_SERVER superglobal and your _______ property to create your path to check. |
A. | $load_dir |
B. | $load |
C. | $save |
D. | $save_dir |
Answer» E. | |
457. |
Which is the Parent class of annotation class? |
A. | Class |
B. | Object |
C. | Main |
D. | Super |
Answer» C. Main | |
458. |
Which of the following annotation is used to avoid execution of Junits? |
A. | @NoTest |
B. | @explicit |
C. | @avoid |
D. | @ignore |
Answer» E. | |
459. |
Using which annotation non visible or private method can be tested? |
A. | @VisibleForTesting |
B. | @NonVisibleForTesting |
C. | @Visible |
D. | @NonVisible |
Answer» B. @NonVisibleForTesting | |
460. |
Which one of the following is not an annotation used by Junit with Junit4? |
A. | @Test |
B. | @BeforeClass |
C. | @AfterClass |
D. | @Ignored |
Answer» E. | |
461. |
Which one of the following is not ID generating strategy using @GeneratedValue annotation? |
A. | Auto |
B. | Manual |
C. | Identity |
D. | Sequence |
Answer» C. Identity | |
462. |
Which one of the following annotations is not used in Hibernate? |
A. | @Entity |
B. | @Column |
C. | @Basic |
D. | @Query |
Answer» E. | |
463. |
Which is the following is not pre defined annotation in Java? |
A. | @Deprecated |
B. | @Overriden |
C. | @SafeVarags |
D. | @FunctionInterface |
Answer» C. @SafeVarags | |
464. |
Annotation type definition looks similar to which of the following? |
A. | Method |
B. | Class |
C. | Interface |
D. | Field |
Answer» D. Field | |
465. |
Which version of Java introduced annotation? |
A. | Java 5 |
B. | Java 6 |
C. | Java 7 |
D. | Java 8 |
Answer» B. Java 6 | |
466. |
Which maven plugin creates the project structure? |
A. | dependency |
B. | properties |
C. | archetype |
D. | execution |
Answer» D. execution | |
467. |
Which of the following is not true for Ant ? |
A. | It is a tool box |
B. | It provides lifecycle management |
C. | It is procedural |
D. | It doesn’t have formal conventions |
Answer» C. It is procedural | |
468. |
Which command can be used to check maven version? |
A. | mvn -ver |
B. | maven -ver |
C. | maven -version |
D. | mvn -version |
Answer» E. | |
469. |
Which of the below is a source code management tool? |
A. | Jenkins |
B. | Maven |
C. | Git |
D. | Hudson |
Answer» D. Hudson | |
470. |
Which environment variable is used to specify the path to maven? |
A. | JAVA_HOME |
B. | PATH |
C. | MAVEN_HOME |
D. | CLASSPATH |
Answer» D. CLASSPATH | |
471. |
Which file is used to specify the packaging cycle? |
A. | build.xml |
B. | pom.xml |
C. | dependency.xml |
D. | version.xml |
Answer» B. pom.xml | |
472. |
Which file is used to define dependency in maven? |
A. | build.xml |
B. | pom.xml |
C. | dependency.xml |
D. | version.xml |
Answer» C. dependency.xml | |
473. |
Which of the following is not a maven goal? |
A. | clean |
B. | package |
C. | install |
D. | debug |
Answer» E. | |
474. |
Which of below is not a dependency management tool? |
A. | Ant |
B. | Maven |
C. | Gradle |
D. | Jenkins |
Answer» E. | |
475. |
AutoCloseable and Flushable are part of which package? |
A. | Autocloseable java.lang; Flushable java.io |
B. | Autocloseable java.io; Flushable java.lang |
C. | Autocloseable and Flushable java.io |
D. | Autocloseable and Flushable java.lang |
Answer» B. Autocloseable java.io; Flushable java.lang | |
476. |
Which version of java added Flushable interface? |
A. | java SE 7 |
B. | java SE 8 |
C. | java SE 6 |
D. | java SE 5 |
Answer» E. | |
477. |
What is the use of Flushable interface? |
A. | Flushes this stream by writing any buffered output to the underlying stream |
B. | Flushes this stream and starts reading again |
C. | Flushes this connection and closes it |
D. | Flushes this stream and throws FlushException |
Answer» B. Flushes this stream and starts reading again | |
478. |
What is the difference between AutoCloseable and Closeable? |
A. | Closeable is an interface and AutoCloseable is a concrete class |
B. | Closeable throws IOException; AutoCloseable throws Exception |
C. | Closeable is a concept; AutoCloseable is an implementation |
D. | Closeable throws Exception; AutoCloseable throws IOException |
Answer» C. Closeable is a concept; AutoCloseable is an implementation | |
479. |
It is a good practise to not throw which exception in close() method of autocloseable? |
A. | IOException |
B. | CustomException |
C. | InterruptedException |
D. | CloseException |
Answer» D. CloseException | |
480. |
Which of the below is a child interface of Autocloseable? |
A. | Closeable |
B. | Close |
C. | Auto |
D. | Cloneable |
Answer» B. Close | |
481. |
What is the alternate of using finally to close resource? |
A. | catch block |
B. | autocloseable interface to be implemented |
C. | try block |
D. | throw Exception |
Answer» C. try block | |
482. |
Autocloseable was introduced in which Java version? |
A. | java SE 7 |
B. | java SE 8 |
C. | java SE 6 |
D. | java SE 4 |
Answer» B. java SE 8 | |
483. |
What does foo.getClass().getMethod(“doSomething”, null) return? |
A. | doSomething method instance |
B. | Method is returned and we can call the method as method.invoke(foo,null); |
C. | Class object |
D. | Exception is thrown |
Answer» C. Class object | |
484. |
What does Class.forName(“myreflection.Foo”).getInstance() return? |
A. | An array of Foo objects |
B. | class object of Foo |
C. | Calls the getInstance() method of Foo class |
D. | Foo object |
Answer» E. | |
485. |
How to get the class object of associated class using Reflection? |
A. | Class.forName(“className”) |
B. | Class.name(“className”) |
C. | className.getClass() |
D. | className.getClassName() |
Answer» B. Class.name(“className”) | |
486. |
How method can be invoked on unknown object? |
A. | obj.getClass().getDeclaredMethod() |
B. | obj.getClass().getDeclaredField() |
C. | obj.getClass().getDeclaredField() |
D. | obj.getClass().getObject() |
Answer» D. obj.getClass().getObject() | |
487. |
What is used to get class name in reflection? |
A. | getClass().getName() |
B. | getClass().getFields() |
C. | getClass().getDeclaredFields() |
D. | new getClass() |
Answer» B. getClass().getFields() | |
488. |
How private field can be called using reflection? |
A. | getDeclaredFields |
B. | getDeclaredMethods |
C. | getMethods |
D. | getFields |
Answer» B. getDeclaredMethods | |
489. |
How private method can be called using reflection? |
A. | getDeclaredFields |
B. | getDeclaredMethods |
C. | getMethods |
D. | getFields |
Answer» C. getMethods | |
490. |
What is not the advantage of Reflection? |
A. | Examine a class’s field and method at runtime |
B. | Construct an object for a class at runtime |
C. | Examine a class’s field at compile time |
D. | Examine an object’s class at runtime |
Answer» D. Examine an object’s class at runtime | |
491. |
Which of the following is not a marker interface? |
A. | Serializable |
B. | Cloneable |
C. | Remote |
D. | Reader |
Answer» E. | |
492. |
What are the components of marker interface? |
A. | Fields and methods |
B. | No fields, only methods |
C. | Fields, no methods |
D. | No fields, No methods |
Answer» E. | |
493. |
Which of the following is not a directive in JSP? |
A. | page directive |
B. | include directive |
C. | taglib directive |
D. | command directive |
Answer» E. | |
494. |
Java code is embedded under which tag in JSP? |
A. | Declaration |
B. | Scriptlet |
C. | Expression |
D. | Comment |
Answer» C. Expression | |
495. |
Can and be used alternatively in JSP? |
A. | True |
B. | False |
Answer» C. | |
496. |
Which tag is used to set a value of a JavaBean? |
A. | <c:set> |
B. | <c:param> |
C. | <c:choose> |
D. | <c:forward> |
Answer» B. <c:param> | |
497. |
What temporarily redirects response to the browser? |
A. | <jsp:forward> |
B. | <%@directive%> |
C. | response.sendRedirect(URL) |
D. | response.setRedirect(URL) |
Answer» D. response.setRedirect(URL) | |
498. |
Which object stores references to the request and response objects? |
A. | sessionContext |
B. | pageContext |
C. | HttpSession |
D. | sessionAttribute |
Answer» C. HttpSession | |
499. |
“out” is implicit object of which class? |
A. | javax.servlet.jsp.PrintWriter |
B. | javax.servlet.jsp.SessionWriter |
C. | javax.servlet.jsp.SessionPrinter |
D. | javax.servlet.jsp.JspWriter |
Answer» E. | |
500. |
Which attribute uniquely identifyaction element? |
A. | ID |
B. | Class |
C. | Name |
D. | Scope |
Answer» B. Class | |