Spring/Spring%20Mcq%20Set%2019 Sample Test,Sample questions

Question:
 For a class to be serialized successfully:

1. The class must implement the java.io.Serializable interface.

2. Every field in the class must be volatile.

3.All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-07 07:27:33


Question:
 Java provides a mechanism, where an object can be represented as a sequence of bytes:-

1.Serialization

2.Compilation

3.All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-06 16:04:36


Question:
 There are frequently situations where OSGi will return more than one instance of a service that satisfies the interface.

1. True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-06 15:40:09


Question:
 These beans are proxies, some may load asynchronously or take a longer time to register.
<osgi:service
      interface="com.apress.springrecipes.
      osgi.helloworld.service.GreeterService">
      <bean class="com.apress.springrecipes.osgi.helloworld.
      service.GreeterServiceImpl"/>
</osgi:service>

1. True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-06 15:18:21


Question:
 To send an email using your Java Application:-

1.JavaMail API

2.Java Activation Framework (JAF)

3.All of the mentioned

4.none of the mentioned

Posted Date:-2022-01-07 07:36:55


Question:
 void addRecipients(Message.RecipientType type, Address[] addresses)
Parameter:- addresses: This is the array of email ID, the method used while specifying email IDs

1.Internet

2. InternetAddress

3. BCC

4.All of the mentioned

Posted Date:-2022-01-07 07:38:32


Question:
 What will be the value of transient field after deserialization:-

1.0

2.NULL

3. All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-07 07:35:32


Question:
 When serializing an object to a file, the standard convention in Java is to give the file a:

1..war

2..java

3..ser

4.None of the mentioned

Posted Date:-2022-01-07 07:28:35


Question:
A more robust solution to service discrimination is service attributes.

1.True

2.False

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-06 15:38:57


Question:
After a serialized object has been written into a file, it can be read from the file and deserialized.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-06 16:05:03


Question:
An anonymous bean specified inside of the osgi:service element allows you to avoid cluttering the namespace.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-06 15:19:44


Question:
Application isolation is critical because it allows you to solve the issue of reconciliation of two services whose interfaces collide. You can use:-

1. .WAR

2. .XML

3..PAR

4. all of the mentioned

Posted Date:-2022-01-06 15:59:33


Question:
Attribute, which, is the symbolic name of another bundle.

1.Fragment

2.Fragment-Host

3.All of the mentioned

4. none of the mentioned

Posted Date:-2022-01-06 15:41:51


Question:
By default, beans created in a Spring application context are global to the entire OSGi runtime.

1.True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-06 15:24:03


Question:
Element to export the bean as an OSGi service, classified by the interface we specify.

1.osgix

2. osgi:service

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-06 15:17:50


Question:
If it is required to provide user ID and Password to the email server for authentication purpose then you can set properties:

1. props.setProperty(“mail.user”, “myuser”)

2.props.setProperty(“mail.password”, “mypwd”)

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-07 07:40:50


Question:
If the class implements java.io.Serializable, then it is serializable; otherwise, it’s not.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-07 07:35:52


Question:
If you want to send an email to multiple recipients:-

1.void addRecipients(Message.RecipientType type, Address[] addresses)

2.void addRecipients(Message.RecipientType type)

3. all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-07 07:37:23


Question:
It is assumed that your localhost is connected to the internet and capable enough to send an email.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-07 07:41:30


Question:
Multiple services of the same interface may be registered inside of an OSGi environment, which necessitates a conflict-resolution process.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-06 15:35:50


Question:
Once acquired, the Bundle can be interrogated to introspect information about the bundle itself, including any entries, its current state.

1.True

2. False

3.none

4.all the mentoined

Posted Date:-2022-01-06 15:28:25


Question:
OSGi doesn’t solve framework concerns, instead focusing on infrastructure requirements for Java applications.

1.True

2. False

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-06 15:45:33


Question:
OSGi will let you maintain multiple versions of a service in your registry at the same time.

1. True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-06 15:33:28


Question:
OSGi–enabling all of these interwoven dependencies via the granular use of the Import-Package header would be tedious.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-06 15:55:58


Question:
Serialization is JVM independent.

1.True

2.False

3.none

4.all the mentoined

Posted Date:-2022-01-06 16:08:34


Question:
Sometimes, you may want to limit the visibility of a service so that multiple clients each get their own instance of the bean.

1.time

2.scope

3.attr

4.None of the mentioned

Posted Date:-2022-01-06 15:24:31


Question:
Spring Dynamic Modules also supports injection and manipulation of bundles themselves. An injected bundle is of type:-

1.org.osgi.framework.savedBundle

2.org.osgi.framework.Bundle

3. org.osgi.framework.BundleInstance

4.None of the mentioned

Posted Date:-2022-01-06 15:26:16


Question:
Spring Dynamic Modules was, while powerful for those already invested in an OSGi platform, not the most natural accommodations for those trying to migrate large code into the OSGi environment, SpringSource created.

1.Spring Dynamic Modules

2. Spring dm Server

3. Spring Tooling

4. all of the mentioned

Posted Date:-2022-01-06 15:48:55


Question:
SpringSource dm Server also allows you to bend the rules where necessary.

1.True

2.False

3.none of the mentioned

4.all the mentoined

Posted Date:-2022-01-06 15:56:26


Question:
SpringSource dm Server many advances focus on delivering a solution, and not just a framework, for delivering:-

1.Spring Tooling

2. Spring dm

3.OSGi

4.None of the mentioned

Posted Date:-2022-01-06 15:50:15


Question:
SpringSource dm Server provides the robustness needed to commoditize enterprise application development in an OSGi environment.

1.True

2.False

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-06 16:00:17


Question:
SpringSource dm Server provides value above and beyond a regular OSGi solution.

1.True

2.False

3.none

4.None of the mentioned

Posted Date:-2022-01-06 15:53:53


Question:
SpringSource dm Server works with several types of deployment formats:-

1. bundle

2.Java EE .war

3. platform archive

4. all of the mentioned

Posted Date:-2022-01-06 15:58:40


Question:
SpringSource has provided solid tooling for Eclipse, called :-

1. Spring Dynamic Module

2.dm Server Tools

3.SpringSource dm Server

4.None of the mentioned

Posted Date:-2022-01-06 16:01:28


Question:
Support for deployment of traditional .war artifacts, enable use of some of the standard Java EE libraries, provide useful defaults for many de facto standard libraries, and provide fully integrated support for Spring Dynamic Modules.

1.Spring Dynamic Modules

2.Spring dm Server

3.Spring Tooling

4. all of the mentioned

Posted Date:-2022-01-06 15:45:08


Question:
The first, most direct connection to OSGi is the bean that’s created on your behalf when you export a service. This bean, an instance of:-

1. org.osgi.framework.ServiceRegistration

2. org.osgi.framework.Service

3.org.osgi.framework.ServiceRegister

4.None of the mentioned

Posted Date:-2022-01-06 15:23:10


Question:
The ObjectInputStream class contains methods for writing various data types.

1. public final Object readObject()

2. public final Object read(Object x)

3.public final Object readFromObject(Object x)

4. all of the mentioned

Posted Date:-2022-01-07 07:25:01


Question:
The ObjectOutputStream class contains methods for writing various data types.

1. public final void writeObject(Object x)

2. public final void write(Object x)

3. public final void writeToObject(Object x)

4. all of the mentioned

Posted Date:-2022-01-07 07:24:05


Question:
These tools—part of the broader SpringSource Tool Suite—are available as :-

1.plug-in

2.stand-alone environment

3.all of the mentioned

4.None of the mentioned

Posted Date:-2022-01-06 16:02:09


Question:
To begin with SpringSource dm Server but need a way to rapidly turnaround development.

1.Spring Dynamic Module

2.Spring Dynamic Server

3. SpringSource dm Server

4. none of the mentioned

Posted Date:-2022-01-06 16:00:51


Question:
To create services and have those automatically installed in the registry.

1.Spring Dynamic Modules

2.Spring DM Server

3. Spring Tooling

4.None of the mentioned

Posted Date:-2022-01-06 15:17:07


Question:
To set content whose second argument is “text/html” to specify that the HTML content is included in the message.

1.setContent

2.content

3.setMail

4. none of the mentioned

Posted Date:-2022-01-07 07:39:01


Question:
void addRecipients(Message.RecipientType type, Address[] addresses)
Parameter:-
type: This would be set to:-

1.TO

2.CC

3.BCC

4.All of the mentioned

Posted Date:-2022-01-07 07:37:52


Question:
When specified on a service element, allows the ascription of a rank relative to other beans with the same interface.

1.Ranking

2.Service

3. All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-06 15:37:34


More MCQS

  1. Spring Mcq Set 1
  2. Spring Mcq Set 2
  3. Spring Mcq Set 3
  4. Spring Mcq Set 4
  5. Spring Mcq Set 5
  6. Spring Mcq Set 6
  7. Spring Mcq Set 7
  8. Spring Mcq Set 8
  9. Spring Mcq Set 9
  10. Spring Mcq Set 10
  11. Spring Mcq Set 11
  12. Spring Mcq Set 12
  13. Spring Mcq Set 13
  14. Spring Mcq Set 14
  15. Spring Mcq Set 15
  16. Spring Mcq Set 16
  17. Spring Mcq Set 17
  18. Spring Mcq Set 18
  19. Spring Mcq Set 19
  20. Spring Mcq Questions
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!