...1.1.1. need help with these questions in java. 19. In Java, how does object s
ID: 3823945 • Letter: #
Question
...1.1.1.
need help with these questions in java.
19. In Java, how does object serialization differ from JavaBeans persistence?
23. true or false? :Remote objects cannot be inserted into a HashSet because any method call on a remote object can result in a RemoteException being thrown, but the equals()and hashCode() methods are not allowed to throw exceptions.
26. Describe how the Model-View-Controller paradigm relates to JavaFX GUIs, Be sure to describe how each aspect of the paradigm relates to different aspects or components of JavaFX. If it aids your answer, feel free to describe a real or fictional application (e.g., the example applications from the course text, or the class project application) that exhibits the required aspects, behaviors, and components and compose your answer from the perspective of that application.
29. Understanding how both JDBC and RMI work, please compare and contrast the two. Your response should include what you think are the key similarities as well as the key differences. Remember to consider how the various access mechanisms for each work as well as how exceptional conditions might manifest themselves. Be thorough, detailed, and original with your response.
Explanation / Answer
[1] Serialize an object means to convert its state to a byte stream so that the byte stream can be reverted back into a copy of the object. A Java object is serializable if its class or any of its superclasses implements either the java.io.Serializable interface or its subinterface.
JavaBeans uses the JDK's Object Serialization API for its serialization needs.
[2] True , Both equals()and hashCode() methods are not allowed to throw exceptions. Becasue Remote objects cannot be inserted into a HashSet .
[3] IN Model-View-Controller paradigm to define view JavaFX programmers have to options: either they use the FXML files to define the view, or they use the Java API. The bottom line is that according to the MVP paradigm, the view must not contain business logic.
[3] RMI is Java's remote procedure call (RPC) mechanism .Java Remote Method Invocation (RMI) provides a simple and direct model for distributed computation with Java objects. These objects can be new Java objects, or can be simple Java wrappers around an existing API. Java embraces the "Write Once, Run Anywhere model. RMI extends the Java model to be run everywhere.
RMI interacts with existing relational databases using JDBC without modifying existing non-Java source that uses the databases.This means you can use RMI to connect two- and three-tier systems even if both sides are not written in Java.
java.sql contains the JDBC package. Each remote method can be implemented by the server using JDBC calls onto the actual database or by native methods that use other database access mechanisms.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.