Java Section 10 - 14

¡Supera tus tareas y exámenes ahora con Quizwiz!

What is microservice? a) A Microservice is an architecture that allows developers to develop services independently. Each service running has its own process and this achieves the lightweight model to support business applications. b) A Microservice is an architecture that allows developers to develop services non independently. c) A Microservice is an architecture that allows developers to develop services independently. Each service running will not have its own process and this achieves the lightweight model to support business applications. d) None of the above.

a) A Microservice is an architecture that allows developers to develop services independently. Each service running has its own process and this achieves the lightweight model to support business applications.

What is a Spring bean? a) A Spring bean is the object that is instantiated, assembled, and otherwise managed by a Spring Inversion of Control container. b) A Spring bean is the constructor for creating interfaces. c) A Spring bean is a method that is used to fill up the Spring Container. d) None of the above.

a) A Spring bean is the object that is instantiated, assembled, and otherwise managed by a Spring Inversion of Control container.

What is the Spring Security? a) Spring security can only be used by C# and limited use with Java. b) Spring security is a framework that focuses on providing non security for Spring application. a) A Spring bean is the object that is instantiated, assembled, and otherwise managed by a Spring Inversion of Control container. d) None of the above.

a) A Spring bean is the object that is instantiated, assembled, and otherwise managed by a Spring Inversion of Control container.

What is a Web Service? a) A Web Service is a service that is delivered over the web. A Web Service is also a software system that is designed to be able to exchange and make use of information from machine-to-machine over the network. b) A Web Service is not a service that is delivered over the web. A Web Service is also a software system that is designed to be able to exchange and make use of information from machine-to-machine over a network. c) A Web Service is a service that is delivered over the web. A Web Service is also source code that is designed to be able to exchange and make use of information from machine-to-machine over the network. d) None of the above.

a) A Web Service is a service that is delivered over the web. A Web Service is also a software system that is designed to be able to exchange and make use of information from machine-to-machine over the network.

What is the function of a session? a) A session will: - wrap a JDBC connection - main object used to save/retrieve objects - retrieved from Session Factory b) A session will: - will not wrap a JDBC connection - main object used to save/retrieve objects - retrieved from Session Factory c) A session will: - wrap a JDBC connection - main object used to save/retrieve objects - it is not retrieved from Session Factory d) None of the above

a) A session will: - wrap a JDBC connection - main object used to save/retrieve objects - retrieved from Session Factory

What is continuous delivery as it pertains to microservices? a) Allows frequent releases of software, through systematic automation of software creation, testing and approval. b) Allows non frequent releases of software, through systematic automation of software creation, testing, and approval. c) Allows non frequent releases of software, through asystematic automation of software creation, testing, and approval. d) None of the above.

a) Allows frequent releases of software, through systematic automation of software creation, testing and approval.

What is Aspect Oriented Programming (AOP)? a) Aspect-Oriented Programming entails breaking down program logic into distinct parts called concerns. b) Aspect-Oriented Programming entails breaking down program logic into distinct parts called multiple inheritance. c) Aspect-Oriented Programming is a way to use multiple inheritance in Java. d) All of the above.

a) Aspect-Oriented Programming entails breaking down program logic into distinct parts called concerns.

What is autonomy as it pertains to microservices? a) Autonomy refers to developers and teams working independently of each other, thus increasing development speed. b) Autonomy refers to developers and teams working independently of each other, thus decreasing speed. c) Autonomy refers to developers and teams can work non independently of each other thus increasing speed. d) All of the above.

a) Autonomy refers to developers and teams working independently of each other, thus increasing development speed.

What is the componentization as it pertains to microservices? a) Componentization pertains to microservices being treated as independent components that can be easily replaced and upgraded. b) Componentization pertains to microservices that are not treated as independent components that can be easily replaced and upgraded. c) Componentization pertains to microservices that are treated as non independent components that can be easily replaced and upgraded. d) None of the above.

a) Componentization pertains to microservices being treated as independent components that can be easily replaced and upgraded.

What is Hibernate? a) Hibernate is a Java framework for persisting and saving Java objects into a database. b) Hibernate is not a Java framework for persisting and saving Java objects in a database. c) Hibernate is just a tool for creating multiple inheritance. d) None of the above.

a) Hibernate is a Java framework for persisting and saving Java objects into a database.

What are the three keys a Web Service should support: a) I should be designed for machine-to-machine (or application-to-application) interaction. To be platform independent it should be able to implement things on one machine and then use them on another machine without minimal changes. Lastly, they should allow communication over a network. b) It should be designed for non machine-to-machine (or application-to-application) interaction. To be platform independent it should be able to implement things on one machine and then use them on another machine without minimal changes. Lastly, they should allow communication over network. c) It should be designed for machine-to-machine (or application-to-application) interaction. To be platform dependent it should be able to implement things on one machine and then use them on another machine without minimal changes. Lastly, they should allow communication over network. d) None of the above.

a) I should be designed for machine-to-machine (or application-to-application) interaction. To be platform independent it should be able to implement things on one machine and then use them on another machine without minimal changes. Lastly, they should allow communication over a network.

What is multithreading? a) In Java, multithreading is a process of executing multiple threads simultaneously. b) In Java, multithreading is a process of not executing multiple threads simultaneously. c) In Java, multithreading is a process of executing one threads simultaneously. d) None of the above.

a) In Java, multithreading is a process of executing multiple threads simultaneously.

Hibernate is an open source, lightweight, ORM tool. What does ORM stand for? a) Object Relational Mapping b) Object Redundant Mapping c) Object Relative Mapping d) None of the above.

a) Object Relational Mapping

What are the Request and Responses? a) Request - the input for the web service Response - the output from the web service b) Request - the output from the web service Response - the input from the web service c) Request - the non input from the web service Response - the input from the web service d) None of the above.

a) Request - the input for the web service Response - the output from the web service

What is SQL? a) SQL is standard language for storing, manipulating, and retrieving data in a database. b) SQL is a non-standard language for storing, manipulating, and retrieving data in a database. c) SQL is a standard language for not storing, manipulating, and retrieving data in a database. d) All of the above.

a) SQL is standard language for storing, manipulating, and retrieving data in a database.

What is decoupling as it pertains to microservices? a) Services within a system are largely decoupled. So, the application can be easily built, altered, and scaled. b) Services within a system are not largely decoupled. So, the application can be easily built, altered, and scaled. c) None of the above.

a) Services within a system are largely decoupled. So, the application can be easily built, altered, and scaled.

What is Spring Boot? a) Spring Boot is an open source Java-based framework use to create a micro service. It is developed by Pivotal Team and is used to build stand-alone and production ready spring applications. b) Spring Boot is an open source Java-based framework used to create a non-micro service. It is developed by Pivotal Team and is sued to build stand-alone and production ready spring applications. c) Spring Boot is a non open source Java-based framework used to create a micro service. It is developed by Pivotal Team and is used to build stand-alone and production ready spring applications. d) None of the above.

a) Spring Boot is an open source Java-based framework use to create a micro service. It is developed by Pivotal Team and is used to build stand-alone and production ready spring applications.

What is Spring Actuator? a) Spring Boot provides actuator to monitor and manage applications. The actuator is a tool which has HTTP endpoints. When an application is pushed to production you can choose to manage and monitor your application using HTTP endpoints. b) Spring Boot provides actuator to monitor and manage applications. The actuator is a tool which has non HTTP endpoints. When an application is pushed to production you can choose to manage and monitor your application using HTTP endpoints. c) Spring Boot does not provides actuator to monitor and manage applications. d) None of the above.

a) Spring Boot provides actuator to monitor and manage applications. The actuator is a tool which has HTTP endpoints. When an application is pushed to production you can choose to manage and monitor your application using HTTP endpoints.

What does the HTTP response Stats code 200 and 400 represent? a) Status Code 200 : represent a successful transaction Status Code 400: represent a page not found b) Status Code 200 : represent a non successful transaction Status Code 400: represent a page not found c) Status Code 200 : represent a successful transaction Status Code 400: represent a page found d) All of the above

a) Status Code 200 : represent a successful transaction Status Code 400: represent a page not found

What is the SQL DELETE statement? a) The DELETE statement is used to delete existing records in a table. b) The DELETE statement is used to delete non-existing records in a table. c) The DELETE statement is used to delete existing records in a Java project. d) None of the above.

a) The DELETE statement is used to delete existing records in a table.

What is the SQL INSERT INTO statement? a) The SQL INSERT INTO statement is used to insert new records in a table. b) The SQL INSERT INTO statement is used to delete new records in a table. c) The SQL INSERT INTO statement is used to insert noting into a table. d) None of the above.

a) The SQL INSERT INTO statement is used to insert new records in a table.

What is an SQL SELECT statement? a) The SQL SELECT statement is used to select data from a database. The data returned is stored in a result table called the result-set. b) The SQL SELECT statement is used to select data from a java project. The data returned is stored in a result table called the result set. c) The SQL SELECT statement is used the select data from a database. The data returned is stored in a result table called the result. d) None of the above.

a) The SQL SELECT statement is used to select data from a database. The data returned is stored in a result table called the result-set.

What is an SQL WHERE clause? a) The SQL WHERE clause is used to filter records. The WHERE clause is used to extract only those records that fulfill a specified condition. b) The SQL WHERE clause is used to retrieve records. The WHERE clause is used to extract only those records that fulfill a specified condition. c) The SQL WHERE clause is used to filter records. The WHERE clause is used to extract only those records that do not fulfill a specified condition. d) None of the above

a) The SQL WHERE clause is used to filter records. The WHERE clause is used to extract only those records that fulfill a specified condition.

How does data exchange between applications take place? a) The application will need to send an input called render to the web service, and then the web service will need to send an output back to the application. a) The application will need to send an input called setter to the web service, and then the web service will need to send an output back to the application. a) The application will need to send an input called render to the web service, and then the web service will need to send getters back to the application. d) All of the above.

a) The application will need to send an input called render to the web service, and then the web service will need to send an output back to the application.

What is Dependency Injection? a) The client will delegate calls to another object the responsibility of providing its dependencies. b) Dependency injection is when you create objects with interfaces. c) The injection of dependencies is when you have overloaded methods. d) None of the above.

a) The client will delegate calls to another object the responsibility of providing its dependencies.

What would the code below do? try { Student tempStudent = new Student ("Jack", "Man", "[email protected]") session.beginTransaction( ); session.save(tempStudent); session.getTransaction( ).commit( ); } finally { factory.close( ); } a) The code snippet will save a Java object into the database. b) The code snippet will create an object. c) The code will delete an object. d) None of the above.

a) The code snippet will save a Java object into the database.

What will the code below do? Student myStudent = session.get(Student.class, studentId); session.delete(myStudent); a) The code will delete the student object. b) The code will delete the session. c) The code will delete the student class. d) None of the above.

a) The code will delete the student object.

Who create Spring? a) The first version of Spring was written by Rod Johnson, who released the framework with the publication of his book Expert One-on-One JA2EE Design and Development in October 2002. The framework was first released under the Apache 2.0 license in June 2003. b) The first version of Spring was written by Dewayne Johnson, who released the framework with the publication of his book Expert One-on-One JA2EE Design and Development in October 2002. The framework was first released under the Apache 2.0 license in June 2003. c) The first version of Spring was written by Jack Johnson, who released the framework with the publication of his book Expert One-on-One JA2EE Design and Development in October 2002. The framework was first released under the Apache 2.0 license in June 2008. d) None of the above.

a) The first version of Spring was written by Rod Johnson, who released the framework with the publication of his book Expert One-on-One JA2EE Design and Development in October 2002. The framework was first released under the Apache 2.0 license in June 2003.

What will the join( ) method do? a) The join( ) method of the Thread class will wait for a thread to die. It is used when you want on thread to wait for completion of another. This process is like a relay race where the second runner waits until the first runner comes and hand over the flag to him/her. b) The join( ) method of the Thread class will not wait for a thread to die. It is used when you want one thread to wait for completion of another. This process is like a relay race where the second runner waits until the first runner comes and hand over the flag to him/her. c) The join( ) method of the Thread class will wait for a thread to die. It is used when you want two thread to wait for the completion of another. This process is like a relay race where the second runner waits until the first runner comes and hand over the flag to him/her. d) None of the above.

a) The join( ) method of the Thread class will wait for a thread to die. It is used when you want on thread to wait for completion of another. This process is like a relay race where the second runner waits until the first runner comes and hand over the flag to him/her.

What will the method start( ) do? a) The start( ) method of the Thread class is used to begin the execution of a thread. The result of this method is a thread that runs simultaneously with all other threads. b) The start( ) method of the Thread class is used to end the execution of a thread. The result of this method is a thread that runs simultaneously with all other threads. c) The start( ) method of the Thread class is used to end the beginning of execution of a thread. The result of this method is a thread that runs simultaneously with all other threads. d) None of the above.

a) The start( ) method of the Thread class is used to begin the execution of a thread. The result of this method is a thread that runs simultaneously with all other threads.

What will the code "session.getTransaction( ).commit( )" below do? Student myStudent = session.get(Student.class, studentId); myStudent.setFirstName("Ellie"); session.getTransaction( ).commit( ); a) This code will commit the change that was made to the first name. b) This code will not commit the changes that were made. c) This code will throw an error. d) None of the above.

a) This code will commit the change that was made to the first name.

What will the code below do? Student theStudent = new Student("Daffy, "Duck", "[email protected]"); a) This code will create a new student object called "theStudent". b) This code will not work. c) This code will create a new table called "theStudent". d) None of the above.

a) This code will create a new student object called "theStudent".

What are the two popular formats for Request and Response? a) XML and JSON b) TML and JSON c) XML and JSONE d) All of the above.

a) XML and JSON

Is Hibernate a Java framework? a) yes b) no

a) yes

Is Spring Boot free and open source? a) yes b) no

a) yes

Will this code create a primary key? @Entity @Table(name = "student") public class Student { @id @Colum(name = "id") private int id; } a) yes b) no

a) yes

What are the features of microservices? a)-------------------------------------- 1. agility 2. decentralized governance 3. responsibility 4. continuous delivery 5. autonomy 6. business capabilities 7. componentization 8. decoupling a)-------------------------------------- 1. non-agility 2. decentralized governance 3. responsibility 4. continuous delivery 5. autonomy 6. business capabilities 7. componentization 8. decoupling a)-------------------------------------- 1. agility 2. decentralized governance 3. responsibility 4. continuous delivery 5. futonomy 6. business capabilities 7. componentization 8. decoupling d) None of the above.

a)-------------------------------------- 1. agility 2. decentralized governance 3. responsibility 4. continuous delivery 5. autonomy 6. business capabilities 7. componentization 8. decoupling

What are the advantages of microservices? a)-------------------------------------- 1. easy deployment 2. simple scalability 3. compatible with containers 4. minimum configuration 5. lesser production time b)-------------------------------------- 1. non easy deployment 2. simple scalability 3. compatible with containers 4. minimum configuration 5. lesser production time c)-------------------------------------- 1. easy deployment 2. simple scalability 3. compatible with containers 4. lots of configuration 5. lesser production time d) None of the above.

a)-------------------------------------- 1. easy deployment 2. simple scalability 3. compatible with containers 4. minimum configuration 5. lesser production time

What are the microservice architecture components? a)-------------------------------------------------------- clients - different users from various devices send requests identity providers - authenticates user or client's identities and issues security tokens API gateway - handles client request static content - houses client request management - balances services on nodes and identifies failures service discovery - a guide to find the route of communication between microservices content delivery networks - distributed network of proxy servers and their data centers remote - enables the remote access information that resides on a network of IT devices b)-------------------------------------------------------- clients - different users from various devices send requests identity clients - authenticates user or client's identities and issues security tokens API gateway - handles client request static content - houses client request management - balances services on nodes and identifies failures service discovery - a guide to find the route of communication between microservices content delivery networks - distributed network of proxy servers and their data centers remote - enables the remote access information that resides on a network of IT devices c)-------------------------------------------------------- clients - only one users from various devices send requests identity providers - authenticates user or client's identities and issues security tokens API gateway - handles client request static content - houses client request management - balances services on nodes and identifies failures service discovery - a guide to find the route of communication between microservices content delivery networks - distributed network of proxy servers and their data centers remote - enables the remote access information that resides on a network of IT devices d) None of the above

a)-------------------------------------------------------- clients - different users from various devices send requests identity providers - authenticates user or client's identities and issues security tokens API gateway - handles client request static content - houses client request management - balances services on nodes and identifies failures service discovery - a guide to find the route of communication between microservices content delivery networks - distributed network of proxy servers and their data centers remote - enables the remote access information that resides on a network of IT devices

Why Spring Boot? a)--------------------------------------------------------- 1. It provides a flexible way to configure Java Beans, XML configurations, a Database Transactions. 2. It provides a powerful batch processing and manages REST endpoints. 3. In Spring Boot, everything is auto configured, no manual configurations are needed. 4. If offers annotation-based spring application. 5. Eases dependency management. 6. It includes Embedded Servlet Container. b)--------------------------------------------------------- 1. It will not provide a flexible way to configure Java Beans, XML configurations, a Database Transactions. 2. It provides a powerful batch processing and manages REST endpoints. 3. In Spring Boot, everything is auto configured, no manual configurations are needed. 4. If offers annotation-based spring application. 5. Eases dependency management. 6. It includes Embedded Servlet Container. c)--------------------------------------------------------- 1. It provides a flexible way to configure Java Beans, XML configurations, a Database Transactions. 2. It provides a powerful batch processing and manages REST endpoints. 3. In Spring Boot, everything is non auto configured, no manual configurations are needed. 4. If offers annotation-based spring application. 5. Eases dependency management. 6. It includes Embedded Servlet Container. d) None of the above.

a)--------------------------------------------------------- 1. It provides a flexible way to configure Java Beans, XML configurations, a Database Transactions. 2. It provides a powerful batch processing and manages REST endpoints. 3. In Spring Boot, everything is auto configured, no manual configurations are needed. 4. If offers annotation-based spring application. 5. Eases dependency management. 6. It includes Embedded Servlet Container.

What are the 3 ways to configure the spring container? a) 1. TML Configuration File (legacy) 2. Java Annotations (modern) 3. Java Source Code (modern) b) 1. XML Configuration File (legacy) 2. Java Annotations (modern) 3. Java Source Code (modern) c) 1. XML Configuration File (legacy) 2. JavaFx Annotations (modern) 3. Java Source Code (modern) d) 1. XML Configuration File (legacy) 2. Java Annotations (modern) 3. SpringIO Source Code (modern) e) None of the above.

b) 1. XML Configuration File (legacy) 2. Java Annotations (modern) 3. Java Source Code (modern)

What are the advantages of Spring Boot? a) 1. extremely hard to understand 2. increases productivity 3. reduces the development time b) 1. easy to understand 2. increases productivity 3. reduces the development time c) 1. extremely hard to understand 2. decreases productivity 3. reduces the development time d) 1. easy to understand 2. increases productivity 3. increases the development time e) All of the above.

b) 1. easy to understand 2. increases productivity 3. reduces the development time

What is a thread? a) A thread is a lightweight sub-process, which is the largest unit of processing. It is a separate path of execution. Threads are independent. b) A thread is a lightweight sub-process, which is the smallest unit of processing. It is a separate path of execution. Threads are independent. c) A thread is a lightweight sub-process, which is the largest unit of processing. It has multiple paths of execution. Threads are independent. d) None of the above.

b) A thread is a lightweight sub-process, which is the smallest unit of processing. It is a separate path of execution. Threads are independent.

When was Hibernate started and by whom? a) Hibernate was started in 1999 by James Gosling. b) Hibernate was started in 2001 by Gavin King. c) Hibernate was started in 2000 by Mark Zuckerberg. d) None of the above.

b) Hibernate was started in 2001 by Gavin King.

What is Inversion of Control? a) Inversion of Control is the approach to hiding data. b) Inversion of Control is the approach to outsourcing the creation and management of objects to a factory or spring container. c) Inversion of Control is the approach to using inheritance. d) All of the above.

b) Inversion of Control is the approach to outsourcing the creation and management of objects to a factory or spring container.

What are the business capabilities as it pertains to microservices? a) Microservices are very complex and focus on a single capability. b) Microservices are very simple and focus on a single capability. c) Microservices are very important and focus on a multiple capability. d) None of the above.

b) Microservices are very simple and focus on a single capability.

What is agility as it pertains to microservices? a) Microservices support non agile development. Any new feature can be quickly developed and discarded again. b) Microservices support agile development. Any new features can be quickly developed and discarded again. c) Microservices support agile development. No new features can be developed and discarded again. d) None of the above.

b) Microservices support agile development. Any new features can be quickly developed and discarded again.

What is MySQL? a) MySQL is a non open-source relational database management system. Its name is a combination of "My", the name of co-founder Michael Widenius's daughter, and "SQL", the abbreviation for Structured Query Language. b) MySQL is an open-source relational database management system. Its name is a combination of "My", the name of co-founder Michael Widenius's daughter, and "SQL", the abbreviation for Structured Query Language. c) MySQL is an open-source relational database management system. Its name is a combination of "My", the name of co-founder Michael Widenius's son, and "SQL", the abbreviation for Structured Query Language. d) None of the above.

b) MySQL is an open-source relational database management system. Its name is a combination of "My", the name of co-founder Michael Widenius's daughter, and "SQL", the abbreviation for Structured Query Language.

What is Spring Boot Dev tools? a) Spring Boot includes an additional set of tools that can make the application development experience a little more pleasant. The Spring-boot-devtools module can be included in only script projects to provide additional development time features. b) Spring Boot includes an additional set of tools that can make the application development experience a little more pleasant. The Spring-boot-devtools module can be included in any project to provide additional development time features. c) Spring Boot includes an additional set of tools that can make the application development experience harder. The Spring-boot-devtools module can be included in any project to provide additional development time features. d) None of the above.

b) Spring Boot includes an additional set of tools that can make the application development experience a little more pleasant. The Spring-boot-devtools module can be included in any project to provide additional development time features.

What is the @Column annotation? a) The @Id annotation is used to specify the details of the column to which a field or property will be mapped. You can use column annotation with the following most commonly used attributes: - name: attribute permits the name of the column to be explicitly specified. - length: attribute permits the size of the column used to map a value particularly for a String value. - nullable: attribute permits the column to be marked NOT NULL when the schema is generated. - unique: attribute permits the column to be marked as containing only unique values. b) The @Column annotation is used to specify the details of the column to which a field or property will be mapped. You can use column annotation with the following most commonly used attributes: - name: attribute permits the name of the column to be explicitly specified. - length: attribute permits the size of the column used to map a value particularly for a String value. - nullable: attribute permits the column to be marked NOT NULL when the schema is generated. - unique: attribute permits the column to be marked as containing only unique values. c) The @Table annotation is used to specify the details of the column to which a field or property will be mapped. You can use column annotation with the following most commonly used attributes: - name: attribute permits the name of the column to be explicitly specified. - length: attribute permits the size of the column used to map a value particularly for a String value. - nullable: attribute permits the column to be marked NOT NULL when the schema is generated. - unique: attribute permits the column to be marked as containing only unique values. d) None of the above.

b) The @Column annotation is used to specify the details of the column to which a field or property will be mapped. You can use column annotation with the following most commonly used attributes: - name: attribute permits the name of the column to be explicitly specified. - length: attribute permits the size of the column used to map a value particularly for a String value. - nullable: attribute permits the column to be marked NOT NULL when the schema is generated. - unique: attribute permits the column to be marked as containing only unique values.

What is the @Table annotation? a) The @Column annotation allows you to specify the details of the table that will be used to persist the entity in the database. b) The @Table annotation allows you to specify the details of the table that will be used to persist the entity in the database. c) The @ID annotation allows you to specify the details of the table that will be used to persist the entity in the database. d) None of the above.

b) The @Table annotation allows you to specify the details of the table that will be used to persist the entity in the database.

What is the SQL UPDATE statement? a) The SQL UPDATE statement is used to modify the new records in a table. b) The SQL UPDATE statement is used to modify the existing records in a table. c) The SQL UPDATE statement is used to delete a table. d) None of the above.

b) The SQL UPDATE statement is used to modify the existing records in a table.

What is the Session Factory? a) The Session Factory will: - read the hibernate config file - create session objects - create two times in our application b) The Session Factory will: - read the hibernate config file - create session objects - only create once in our application c) The Session Factory will: - not read the hibernate config file - create session objects - only create once in our application d) None of the above.

b) The Session Factory will: - read the hibernate config file - create session objects - only create once in our application

What is the difference between Spring and Spring Boot? a) The Spring framework focuses on providing no flexibility to you while Spring Boot aims to shorten the code length and provide you with the easiest way to develop a web application. With annotation configuration and default codes, Spring Boot shortens the time involved in developing an application. b) The Spring framework focuses on providing flexibility to you while Spring boot aims to shorten the code length and provide you with the easiest way to develop a web application. With annotation configuration and default codes, Spring Boot shortens the time involved in developing an application. c) The Spring framework focuses on providing flexibility to you while Spring Boot aims to lengthen the code length and provide you with the easiest way to develop a web application. With annotation configuration and default codes, Spring Boot shortens the time involved in developing an application. d) All of the above.

b) The Spring framework focuses on providing flexibility to you while Spring boot aims to shorten the code length and provide you with the easiest way to develop a web application. With annotation configuration and default codes, Spring Boot shortens the time involved in developing an application.

What is Spring? a) The Spring framework is a programming language and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java JEE platform. b) The Spring framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java JEE platform. c) The Spring framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used in only one Java application, but there are extensions for building web applications on top the Java JEE platform. d) None of the above.

b) The Spring framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java JEE platform.

What does the code below do? session .createQuery("update Student set email ='james.email.com'") .executeUpdate( ); a) The code will set the only one email to a student. b) The code will update the email address for all the students in the database. c) The code will retrieve all the emails for a student. d) None of the above.

b) The code will update the email address for all the students in the database.

What is the @Entity annotation? a) The entity annotation is a class that extends an interface. b) The entity annotation will mark a particular class an entity bean, so it must have a no-argument constructor that is visible with at least protected scope. c) The entity annotation is a class without a no-argument constructor. d) None of the above.

b) The entity annotation will mark a particular class an entity bean, so it must have a no-argument constructor that is visible with at least protected scope.

What is the decentralized governance as it pertains to microservices? a) The focus is on the right tool for the right job. That means there is a standardized pattern and a technology pattern. Developers have the freedom to choose the best useful tools to solve their problems. b) The focus is on using the right tool for the right job. That means there is no standardized pattern or any technology pattern. Developers have the freedom to choose the best useful tools to solve their problems. c) The focus is on using the right tool for the right job. That means there is no standardized pattern or any technology pattern. Developers will not have the freedom to choose the best useful tools to solve their problems. d) None of the above.

b) The focus is on using the right tool for the right job. That means there is no standardized pattern or any technology pattern. Developers have the freedom to choose the best useful tools to solve their problems.

What is the message exchange format? a) The message exchange format for the request and the response in either TML or JSON. b) The message exchange format for the request and the response in either XML or JSON. c) The message exchange format for the request and the response in either XML or JSONE. d) All of the above.

b) The message exchange format for the request and the response in either XML or JSON.

What will the method run( ) do? a) The run( ) method of the Thread class is called if the thread was constructed using a separate non-runnable object otherwise this method does nothing and returns. When the run( ) method calls, the code specified in the run( ) method is executed. You can call the run( ) method multiple times. b) The run( ) method of the Thread class is called if the thread was constructed using a separate runnable object otherwise this method does nothing and returns. When the run( ) method calls, the code specified in the run( ) method is executed. You can call the run( ) method multiple times. c) The run( ) method of the Thread class is called if the thread was constructed using a separate runnable object otherwise this method does nothing and returns. When the run( ) method calls, the code specified in the run( ) method is executed. You can call the run( ) method one time. d) None of the above.

b) The run( ) method of the Thread class is called if the thread was constructed using a separate runnable object otherwise this method does nothing and returns. When the run( ) method calls, the code specified in the run( ) method is executed. You can call the run( ) method multiple times.

How do we make Web Services platform independent? a) This can be done by being able to call the web service from a Java Application. The important thing is that the request and the response in the communication needs to be platform dependent. b) This can be done by being able to call the web service from a Java Application. The important thing is that the request and the response in the communication needs to be platform independent. c) This can be done by being able to call the web service from a home location. The important thing is that the request and the response in the communication needs to be platform independent. d) None of the above.

b) This can be done by being able to call the web service from a Java Application. The important thing is that the request and the response in the communication needs to be platform independent.

What will the code below do? Student theStudent = new Student("Daffy, "Duck", "[email protected]"); session.save(theStudent); Student myStudent = session.get(Student.class, theStudent.getId( )); a) This code will create a new student called the "student" and save it to a database and then it will get the student based on the student class. b) This code will create a new student called "theStudent" and save it to a database and then it will retrieve the student based on the primary key. c) The code will throw an exception. d) None of the above.

b) This code will create a new student called "theStudent" and save it to a database and then it will retrieve the student based on the primary key.

What will this code do? Student theStudent = new Student("Daffy, "Duck", "[email protected]"); session.save(theStudent); a) This code will create a new student called "Daffy" and store it into the database. b) This code will create a new student object called "theStudent" and then save it in your database. c) This code will create a student called "session" and save it in the database. d) None of the above.

b) This code will create a new student object called "theStudent" and then save it in your database

What will the code below do? List<Student> theStudents = session .createQuery("from Student") .getResultList( ); a) This code will only get students that are in the from table. b) This code will retrieve all the students from the database. c) This code will retrieve the session from the student. d) None of the above.

b) This code will retrieve all the students from the database.

What will the code below do? Student myStudent = session.get(Student.class, studentId); myStudent.setFirstName("Ellie"); a) This code will set the student first name to "myStudent". b) This code will set the student first name to "Ellie". c) This code will set the session to the first name of the student. d) None of the above.

b) This code will set the student first name to "Ellie".

The Hibernate Query Language (HQL) is a... a) non-querying language that is not similar in nature to SQL. b) query language for retrieving objects, similar in nature to SQL. c) non-query language. d) None of the above.

b) query language for retrieving objects, similar in nature to SQL.

What are the Hibernate CRUD apps? a)-------------------------------------- - placing words - CRUD - multiple apps b)-------------------------------------- - create objects - read/retrieve objects - update objects - delete objects c)-------------------------------------- - inheritance - encapsulation - abstraction - polymorphism d) None of the above.

b)-------------------------------------- - create objects - read/retrieve objects - update objects - delete objects

What are two options for Mapping? a)------------------------------------------------- 1. XML configuration file (modern, preferred) 2. Java annotations (legacy) b)------------------------------------------------- 1. XML configuration file (legacy) 2. Java annotations (modern, preferred) c)------------------------------------------------- 1. HTML configuration file (modern, preferred) 2. XML annotations (legacy) d) None of the above.

b)------------------------------------------------- 1. XML configuration file (legacy) 2. Java annotations (modern, preferred)

What are some of the HTTP methods for a RESTful Services? a)------------------------------------------------------ GET - I am trying to get the details of something. FETCH - I am trying to update something. POST - I am trying to create something DELETE - I am deleting something. b)------------------------------------------------------ GET - I am trying to get the details of something. PUT - I am trying to update something. POST - I am trying to create something DELETE - I am deleting something. c)------------------------------------------------------ GET - I am trying to get the details of something. FETCH - I am trying to update something. WITHDRAW - I am trying to create something DELETE - I am deleting something. d) None of the above.

b)------------------------------------------------------ GET - I am trying to get the details of something. PUT - I am trying to update something. POST - I am trying to create something DELETE - I am deleting something.

What is a primary key? a) a primary key will never be unique and it will only have unique values that contain non-null values. b) A primary key will uniquely identify a column in a table. It must have non-unique values and can contain null values. c) A primary key will uniquely identify each row in a table. It must have a unique value and cannot contain null values. d) None of the above.

c) A primary key will uniquely identify each row in a table. It must have a unique value and cannot contain null values.

What is the @Id annotation? a) The @Id annotation is used to annotate the column. b) Each entity bean will have a primary key, which you will annotate a private field with the @Column annotation. c) Each entity bean will have a primary key, which you will annotate a private field with the @Id annotation. d) None of the above.

c) Each entity bean will have a primary key, which you will annotate a private field with the @Id annotation.

What are Spring Boot Starters? a) Handling dependency management is a difficult task for big projects. Spring Boot resolves this problem by providing a set of interfaces, and methods for developer's convenience. b) Handling dependency management is an easy task for big projects. Spring Boot resolves this problem by providing a set of dependencies for developer's convenience. c) Handling dependency management is a difficult task for big projects. Spring Boot resolves this problem by providing a set of dependencies. d) None of the above.

c) Handling dependency management is a difficult task for big projects. Spring Boot resolves this problem by providing a set of dependencies.

What does Hibernate simplify? a) Hibernate is a clojure framework that is designed to work with a database. b) Hibernate is a React framework that is designed to work with a database. c) Hibernate is a Java framework that simplifies the development of Java applications to interact with a database. d) All of the above.

c) Hibernate is a Java framework that simplifies the development of Java applications to interact with a database.

What is REST? a) REST stands for Representational State Transfer. It makes the best use of the non HTTP methods GET, PUT, POST, and DELETE. b) REST stands for Representational Status Transfer. It makes the best use of the HTTP methods GET, PUT, POST, and DELETE. c) REST stands for Representational State Transfer. It makes the best use of the HTTP methods GET, PUT, POST, and DELETE. d) None of the above.

c) REST stands for Representational State Transfer. It makes the best use of the HTTP methods GET, PUT, POST, and DELETE.

How does Spring Boot work? a) Spring Boot automatically configures your application based on the interfaces you have added to the project by using @EnableAutoConfiguration annotation. For example, if MySQL database is your class path, but you have not configured any database connection, then Spring Boot auto-configures an in-memory database. The entry point of the Spring Boot application is the class contains @SpringBootApplication annotation in the main method. Spring Boot automatically scans all the components included in the project by using @ComponentScan annotation. b) Spring Boot never configures your application based on the dependencies you have added to the project by using @EnableAutoConfiguration annotation. For example, if MySQL database is your class path, but you have not configured any database connection, then Spring Boot auto-configures an in-memory database. The entry point of the Spring Boot application is the class contains @SpringBootApplication annotation in the main method. Spring Boot automatically scans all the components included in the project by using @ComponentScan annotation. c) Spring Boot automatically configures your application based on the dependencies you have added to the project by using @EnableAutoConfiguration annotation. For example, if MySQL database is your class path, but you have not configured any database connection, then Spring Boot auto-configures an in-memory database. The entry point of the Spring Boot application is the class contains @SpringBootApplication annotation in the main method. Spring Boot automatically scans all the components included in the project by using @ComponentScan annotation. d) None of the above.

c) Spring Boot automatically configures your application based on the dependencies you have added to the project by using @EnableAutoConfiguration annotation. For example, if MySQL database is your class path, but you have not configured any database connection, then Spring Boot auto-configures an in-memory database. The entry point of the Spring Boot application is the class contains @SpringBootApplication annotation in the main method. Spring Boot automatically scans all the components included in the project by using @ComponentScan annotation.

What is the difference between Spring MVC and Spring Boot? a) Spring JVC is a framework to be used in a web applications and Spring Boot is a Spring based production-ready project initializer. b) Spring MVC is framework to be used in web applications and Spring Boot is a non Spring based production-ready project initializer. c) Spring MVC is a framework to be used in web applications and Spring Boot is a Spring based production-ready project initializer. d) All of the above.

c) Spring MVC is a framework to be used in web applications and Spring Boot is a Spring based production-ready project initializer.

An ORM tool simplifies what? a) The ORM will only simplify data manipulation. b) The ORM will not simplify data creation but it will aid in creating data access. c) The ORM will simplify data creation, data manipulation, and data access. It is a programming technique that will map objects to data that is stored in a database. d) None of the above.

c) The ORM will simplify data creation, data manipulation, and data access. It is a programming technique that will map objects to data that is stored in a database.

What is the Spring Container? a) The spring container is responsible for managing object life cycles of specific objects, creating these objects, and configuring these objects by wiring them together. It is also responsible for serializing object dependencies (Dependency Injection). b) The spring container is responsible for managing object life cycles of specific objects, creating these objects, and configuring these objects by wiring them together. It is also responsible for decoupling object dependencies (Dependency Injection). c) The spring container is responsible for managing object life cycles of specific objects, creating these objects, and configuring these objects by wiring them together. It is also responsible for injecting object dependencies (Dependency Injection). d) None of the above

c) The spring container is responsible for managing object life cycles of specific objects, creating these objects, and configuring these objects by wiring them together. It is also responsible for injecting object dependencies (Dependency Injection).

What is the Spring Boot initializer? a) The spring initializer is ultimately a web application that can generate a Spring Boot project structure for you. It will not generate any application code, but it will give you a basic project structure along with all the source code you need to complete a functional Spring Boot project. b) The spring initializer is ultimately a project you use that can generate a Spring Boot project structure for you. It will not generate any application code, but it will give you a basic project structure. c) The spring initializer is ultimately a web application that can generate a Spring Boot project structure for you. It will not generate any application code, but it will give you a basic project structure. d) All of the above.

c) The spring initializer is ultimately a web application that can generate a Spring Boot project structure for you. It will not generate any application code, but it will give you a basic project structure.

What will the code below do? List<Student> theStudents = session .createQuery("from Student s where s.lastName = 'Doe'"); .getResultList( ); a) This code will retrieve all the students. b) This code will iterate through the lastName and print out the name of Doe. c) This code will retrieve the students where last name equals Doe. d) None of the above.

c) This code will retrieve the students where last name equals Doe.

What will the code below do? List<Student> theStudents = session .createQuery("from Student s where s.lastName = 'Doe'" + "OR s.firstName = 'Daffy'"); .getResultList( ); a) This code will query the lastName table for Doe and also the firsName table. b) This code will output all the students. c) This code will select the student table and then retrieve the students where the las name equals Doe, and where the firs name equals Daffy. d) None of the above..

c) This code will select the student table and then retrieve the students where the las name equals Doe, and where the firs name equals Daffy.

What are some of the ID generation strategies? a)------------------------------------------- GenerationType.Auto GenerationType.TOP GenerationType.SEQUENCE GenerationType.TABLE b)------------------------------------------- GenerationType.Auto GenerationType.IDENTITY GenerationType.SEQUENCE GenerationType.FLOOR c)------------------------------------------- GenerationType.Auto GenerationType.IDENTITY GenerationType.SEQUENCE GenerationType.TABLE d) None of the above.

c)------------------------------------------- GenerationType.Auto GenerationType.IDENTITY GenerationType.SEQUENCE GenerationType.TABLE

What are the steps when using Java annotations? a)------------------------------------------------ step 1. Map fields to the database table. step 2. Map class to the database columns. b)------------------------------------------------ step 1. Map fields to the database columns. step 2. Map class to the database table. c)------------------------------------------------ step 1. Map class to the database table. step 2. Map fields to the database columns. d) None of the above.

c)------------------------------------------------ step 1. Map class to the database table. step 2. Map fields to the database columns.

What are some of the goals for Spring Boot? a)----------------------------------------------------- 1. to avoid complex XML configuration in Spring 2. to develop a non production ready Spring application in an easier way 3. to reduce the development time and run the application independently 4. offer an easier way of getting started with an application b)----------------------------------------------------- 1. to have complex XML configuration in Spring 2. to develop a production ready Spring application in an easier way 3. to reduce the development time and run the application independently 4. offer an easier way of getting started with an application c)----------------------------------------------------- 1. to avoid complex XML configuration in Spring 2. to develop a production ready Spring application in an easier way 3. to reduce the development time and run the application independently 4. offer an easier way of getting started with an application d) None of the above

c)----------------------------------------------------- 1. to avoid complex XML configuration in Spring 2. to develop a production ready Spring application in an easier way 3. to reduce the development time and run the application independently 4. offer an easier way of getting started with an application

What are some of the benefits of Hibernate? a)------------------------------------------------------ - it will create all the code for you - it will take away all configurations b)------------------------------------------------------ - it will always insert, create, and delete for you automatically c)------------------------------------------------------ - it handles all of the low-level SQL commands - it minimizes the amount of JDBC code you must develop - it provides the object-to-relational mapping (ORM) d) None of the above.

c)------------------------------------------------------ - it handles all of the low-level SQL commands - it minimizes the amount of JDBC code you must develop - it provides the object-to-relational mapping (ORM)

What are some advantages of Java Multithreading? a) The programmer can create non-blocking operations because threads are independent, and one can perform multiple operations at the same time. b) One can perform many operations together, so it increases performance. c) Threads are independent, so it does not affect other threads if an exception occurs in a single thread it will not shut down the main thread. Therefore, the program is more robust. d) All of the above.

d) All of the above.

What are some of the things that SQL can do? a)--------------------------------------------- 1. execute queries against the database 2. retrieve data from a database 3. insert records into a database 4. update records in a database 5. delete records from a database 6. create a new database. b)---------------------------------------------- 1. execute queries against the database 2. retrieve data from a database 3. insert records into a database 4. update records in a database 5. delete records from a database 6. create a new database. c)---------------------------------------------- 1. execute queries against the database 2. retrieve data from a database 3. insert records into a database 4. update records in a database 5. delete records from a database 6. create a new database. d) All of the above.

d) All of the above.

What will the code below do? Student myStudent = session.get(Student.class, studentId); session.delete(myStudent); session.getTransaction( ).commit( ); a) This code will delete the myStudent object and the session.getTransaction( ).commit( ); will update the changes. b) This code will delete the transaction. c) This code will not do anything it will throw an exception. d) None of the above.

session.getTransaction( ).commit( ); will update the changes.


Conjuntos de estudio relacionados

B. Policy Riders, Provisions, Options and Exclusions-Incontestability Clause

View Set

Chapter 3 Diagnosis and Assessment Multiple Choice

View Set

AP Statistics Chapter 4 Study Tool | Example Problems

View Set

MA Review Note Plus by Susan M. Perreira

View Set