Hello I have a java question but I don't know how to combine it with html and how to create an web browser with my java code
Try to solve the following problem. Note: Don't let the html code confuse you; as far as this problem is concerned it is simply text to be output in exactly the same way you have done for the other problems. A company requires that all its employees have a webpage. To date, a secretary has been asked to create each such page by hand. As a new engineer in a company's IT department you realise that the job can easily be done much cheaper, quicker and with less errors, using a computer program. Your boss thinks this is a great idea and asks you to immediately start work to design and implement such a program. The art department comes up with the stunning webpage layout shown below. You decide that the secretary should be able to run the program, input the new employee's name, their age, salary and a paragraph of comments about them, and have it automatically create and save the necessary html code in a file. This file can then be viewed using a standard web browser such as Internet Explorer, Chrome or Firefox.
The html code corresponding to the art department's sample design is shown next to it. Notice that it is just special html tags, such as <p> & </p>, with the employee's details between them. You should define named constants for each of these tags (so that they can be reused and changed easily.) Initially, design your program so that it first gets all the necessary information from the user, and then displays the corresponding html on the system console.
This is my code:
import java.util.Scanner;
public class heat {
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
String name=in.next();
System.out.println("Enter the age:");
int age=in.nextInt();
System.out.println("Enter the salary:");
double salary=in.nextDouble();
System.out.println("Comments:");
String comments=in.next();
}
}
This is the html that teacher gave us:
<!DOCTYPE html>
<html>
<head>
<title>Derya's Home Page</title>
</head>
<body>
<hr>
<h1>Derya</h1>
<p>Age: 18</p>
<p>Salary: 1000.0</p>
<p>Comments: Smart girl!</p>
<hr>
</body>
</html>