Read the most frequently asked 35 top Springs interview questions and answers for freshers and experienced job interview questions pdf
Springs Interview Questions and Answers List
1. What is the meaning of the return data type void?
A. An empty memory space is returned so that the developers can utilize it.
B. void returns no data type.
C. void is not supported in Java
D. None of the above
2. A lower precision can be assigned to a higher precision value in JavA. For example a byte type data can be assigned to int type.
Ans : B
3. Which of the following statements about the Java language is true?
A. Both procedural and OOP are supported in JavA.
B. Java supports only procedural approach towards programming.
C. Java supports only OOP approach.
D. None of the above.
4. Which of the following statements is false about objects?
A. An instance of a class is an object
B. Objects can access both static and instance data
C. Object is the super class of all other classes
D. Objects do not permit encapsulation
5. Which methods can access to private attributes of a class?
A. Only Static methods of the same class
B. Only instances of the same class
C. Only methods those defined in the same class
D. Only classes available in the same package.
6. Formed on a diskette (or hard drive) during initialization.
A. source code
D. storage units
7. The CPU consists of:
A. Control Unit, Temporary Memory, Output
B. Control Unit, Arithmetic Logic Unit, Temporary Memory
C. Input, Process, Storage, Output
D. Input, Control Unit, Arithmetic Logic Unit, Output
8. OOP stands for:
A. Observable Object Programming
B. Object Observed Procedures
C. Object Oriented Programming
D. Object Overloading Practices
9. Output printed on paper.
C. source code
10. A binary digit (1 or 0) signifying “on” or “off”.
11. Our decimal number 44, when represented in binary, is:
12. Byte code is the machine language for a hypothetical computer called the:
A. Java Byte Code Compiler
B. Java Byte Code Interpreter
C. Java Virtual Machine
D. Java Memory Machine
13. Equals 8 bits.
14. Java allows for three forms of commenting:
A. // single line, ** block lines, /*/ documentation
B. // single line, /*…*/ block lines, /**…*/ documentation
C. / single line, /* block lines, ** documentation
D. // single line, //…// block lines, //*…*// documentation
15. To prepare a diskette (or hard drive) to receive information.
16. In Java, the name of the class must be the same as the name of the .java file.
B. true – but case sensitivity does not apply
C. true – but additional numbers may be added to the name
17. The name Java was derived from
A. a cup of coffee
B. an acronym for JBuilder Activated Variable Assembly
C. an acronym for Juxtapositioned Activated Variable Actions
D. an acronym for John’s Answer for Various Accounts
18. Programs that tell a computer what to do.
C. hard copy
19. RAM stands for _________.
A. Read Anytime Memory
B. Read Allocated Memory
C. Random Access Memory
D. Random Allocated Memory
20. Several computers linked to a server to share programs and storage space.
D. integrated system
21. Source code in Java will not run if it is not indenteD.
22. When working in Java with JBuilder, each program you write should be assigned to a new project.
23. The four equipment functions of a computer system.
A. Input, Process, Control Unit, Output
B. Input, Control Unit, Arithmetic Logic Unit, Output
C. Input, Process, Storage, Output
D. Input, Process, Library Linking, Output
24. Translates and executes a program line by line.
D. control unit
25. The physical components of a computer system.
A. control unit
26. Struts was first developed
A. in an online exchange between several open source developers
B. over a long holiday weekend
C. as a commercial package
27. The reset method on an ActionForm
A. Sets all properties to their initial value
B. Sets all properties to null
C. Repopulates all properties from the request parameters
D. None of the above
28. Each Struts Action element is uniquely identified by its
A. Input attribute
B. Name attribute
C. Page attribute
D. Path attribute
29. The name of the Application Resources file is set by the servlet init-param named
30. The validating init-param of the ActionServlet is used to
A. Bypass calls to the ActionForm validate method
B. Bypass validation of the Struts configuration file
C. Generate an error message if an unknown message key is used
31. To specify an ActionMapping to use when a request doesn’t match any other mapping, you can
A. Use an asterisk for the path property
B. Set the “default” property of the mapping to “true”
C. Set the “unknown” property of the mapping to “true”
D. Set the “missing” init-param of the ActionServlet to the mapping’s path
32. If you have created a custom ActionMapping subclass with the property “service”, you can initialize the value to “selectRecord” using
A. <init-property name=”service” value=”selectRecord”/>
B. <set-property property=”service” value=”selectRecord”/>
C. <put-field key=”service” content=”selectRecord”/>
33. In Struts 1.1, you can change how Struts populates a form by
A. Overriding the populate method of the ActionForm
B. Overriding the processPopulate method of the Request Processor
C. Overriding the populateBean method of the ActionMapping
34. The <bean:write> tag is:
A. Always converts HTML markup to entity equivalents, like <
B. Never converts HTML markup to entity equivalents
C. Converts markup when filter=true
D. Converts markup when markup=false
35. To prevent possible security issues with the <html:password> tag, you should
A. Call the reset method if validation fails
B. Set the tag’s redisplay property to false
C. Set the tag’s reset property to false
D. Use a plain html tag instead