Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

There are two ways to create threads in java, one by extending the Thread class and another is by implementing Runnable interface. When to use which option to create thread, which one is better and why? Explain with example.


What is difference between error and exception? In the case of exception handling, what is the need for finally block? Can finally block be used without catch? Explain your opinion with example.


Distinguish among Multiprocessing, Multithreading, Multitasking and Multiprogramming. How do you ensure that N thread can access N resources without deadlock?


How do we provide security to RMI classes? Write a program to implement Simple Student database application using RMI. Remote client consist of GUI for performing different database operations (For ex. Insert, delete, update) and retrieving data through RMI.


a. JAVA is known to be an object oriented program. Objects are also
known to exist in real life. You have been invited as a computer science
student to distinguish between real life objects and object found in object
oriented program OOP

b. Write an OOP to compare the risk factor that will lead to high payment of
life insurance premium. The variables to consider are: age, weight, and
height.

I) The program should request for the variables to be inputted from the keyboard.

II) Premium should be high if age is greater than or equal to 60 years and
weight is greater than or equal 80kg and has greater than or equal 6.8
feet. Otherwise, the premium should be low

III) Critically explain how the program could be adopted by allied
companies for their operations.

Create a Registration Form by using the following instructions:

Step 1: Create a Registration Form using Java Swing

a. Import Necessary Packages

b. Create a Frame using JFrameclass

c. Set Background color of the JFrame

d. Create JLabelfor Heading Text

e. Create a JLabel and JTextField for the name.

f. Create a JLabel and JTextField for Father’s Name

g. Create JLabel and JRadioButton for Gender

h. Create JLabel and JComboBox for Date of Birth

i. Create a JLabel and JTextArea for the Address

j. Create JLabel and JTextField for the Phone

k. Create JLabel and JTextField for the Email

l. Create a JCheckBox for Accepting License Agreement

m. Creating a JButton to Submit the Value

n. Change Font Style and Size for all the Components

o. Add all Components to the Container

p. Create a JTextArea for Output

Step 2: Add ActionListener to the Button

Add ActionListener on the Submit Button

Step 3: Read the value on the Registration Form

Read and display the value on the Registration form


Write a program to implement Simple Student database application using RMI. Remote client consist of GUI for performing di erent database operations (For ex. Insert, delete, update) and retrieving data through RMI.
1) output picture
2) code explanation

Dumledore’s dining table can be thought of as an infinite row of seats with Dumbledore at one end. Each of Dumbledore’s guests represents a character of English alphabet (a to z).Dumbledore wants his guests to be seated such that the resulting string formed from the alphabets should be lexicographically smallest (See examples for reference).● Seats are allotted in sequential order, a guest who arrives later must be further from Dumbledore than a guest who arrives earlier.● An incoming guest must be assigned a seat, as soon as he arrives. He will take a seat.● Once a guest takes their seat, you can’t ask them to move to some other seat. Even if the seat in front of him is empty, they will stay at their occupied seat only.● But you can make a guest disappear using your spells, Dumbledore has allowed you to make at most ‘k’ of his guests disappear. He can handle ‘k’ guests not in the party but you can’t remove more than ‘k’ guests.


Create a program where you have to design your own Java console application about any valid problem that your application must solve. Your solution can include solving a business problem, a new idea or even a game. Your application must make use of concepts such as arrays, loops, inheritance, constructors and information hiding. Output must be shown in the form of a report using the console. Use Advanced arrays & Introduction to inheritance


Write a program that prints the sum, difference, product, quotient and remainder of two numbers. Initialize the numbers with the values 44 and 2.


LATEST TUTORIALS
APPROVED BY CLIENTS