-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path66.java
More file actions
29 lines (25 loc) · 773 Bytes
/
66.java
File metadata and controls
29 lines (25 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* 66)Trabalhar com Strings multilinhas usando Text Blocks
*
* Defina uma String que contenha a estrutura básica de um documento HTML.
* O título da página deve ser "Seu Titulo", e seu corpo deve conter um h1 com Titulo Qualquer e
* com o texto H2 "Linguagem de Programacao".
*/
class HtmlGenerator {
public static void main(String[] args) {
String instituicao = "SENAC";
String curso = "Técnico em Informática";
String uc = "Linguagem de Programação";
String html = """
<html>
<head>
<title>%s</title>
</head>
<body>
<h1>%s</h1>
<h2>%s</h2>
</body>
</html>
""".formatted(instituicao, curso, uc);
System.out.println(html);
}
}