Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java Questions 1.What is the difference between multiprocessing and multithreadi

ID: 3841507 • Letter: J

Question

Java Questions

1.What is the difference between multiprocessing and multithreading?

2.How many Abstract Classes can a subclass extend?

3.What two techniques can be used to change the appearance of a JavaFx UI?

4.What Java package are collections (data structures) located in?

5.What are the benefits to Unit testing code (Junit)?

6.What 3 parameters are used in assertEquals()?

7.In assertEquals(), what is the delta argument used for?

8.Test Classes and methods build up into what larger testing structure?

9.What is the difference between autoboxing and unboxing?

10.If no access specifier is used, what type of default access is applied to a class?

11.What is the purpose of keyword protected?

12.What purpose do annotations serve?

Explanation / Answer

1.

Multiprocessing and Multithreading both adds performance to the system. Multiprocessing is adding more number of or CPUs/processors to the system which increases the computing speed of the system. Multithreading is allowing a process to create more threads which increase the responsiveness of the system.

Multiprocessing is like the OS handling the different jobs in main memory in such a way that it gives its time to each and every job when other is busy for some task such as I/O operation. So as long as at least one job needs to execute, the cpu never sit idle. and here it is automatically handled by the OS,

Multi-threading refers to an application with multiple threads running within a process, while multi-processing refers to an application organised across multiple OS-level processes.

2.

The subclass of abstract class in java must implement all the abstract methods unless the subclass is also an abstract class. A class that is declared as abstract is known as abstract class. It needs to be extended and its method implemented. It cannot be instantiated. The purpose of abstract classes is to function as base classes which can be extended by subclasses to create a full implementation

3. The JavaFX UI controls are built by using nodes in the scene graph. Therefore, the controls can use the visually rich features of the JavaFX platform.

You can customize the look of the built-in UI controls by defining your own Cascading Style Sheets (CSS). Using CSS in JavaFX applications is much the same as using CSS in HTML, because each case is based on the same CSS specification.

4. Most of the Java collections are located in the java.util package.    

java.util package contains the Collections Framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).collections in the java.util.concurrent package.

5.

JUnit is an open source framework that has been designed for the purpose of writing and running tests in the Java programming language.

JUnit is a testing framework that developers use for writing test cases while developing the software. They would write and run test cases for every function they write. So using this, you make sure that every single tits and bits in your software is tested even before module or System level testing is performed.

JUnit helps us to code and test both during the development. JUnit can solve all these issues of testing. JUnit is used to test an actual class. Using JUnit we can save testing time.

6. message, expected, actuals are the three parameters that are used in assertEquals().

7. In assertEquals(),It is necessary to use a delta for comparison, to avoid issues with floating-point rounding.

9. The automatic conversion of primitive data types into its equivalent Wrapper type is known as boxing and opposite operation is known as unboxing.  For example, converting an int to an Integer, a double to a Double, and so on. If the conversion goes the other way, this is called unboxing.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote