FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java-labs/java-oop-ru/code-generation/examples/Example.java at main · vmorkhat/java-labs · GitHub
vmorkhat
/
java-labs
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
1
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
java-labs
/
java-oop-ru
/
code-generation
/
examples
/
Example.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (33 loc) · 943 Bytes
Breadcrumbs
java-labs
/
java-oop-ru
/
code-generation
/
examples
/
Example.java
Copy path
File metadata and controls
39 lines (33 loc) · 943 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
30
31
32
33
34
35
36
37
38
39
package
exercise
;
import
exercise
.
demo
.
Item
;
class
Example
{
public
static
void
main
(
String
[]
args
) {
//data + getter/setter/toString
// Item milk = new Item();
// milk.setId(1);
// milk.setName("Молоко");
// milk.setPrice(99.90);
// System.out.println(milk);
////
// Item bread = new Item();
// bread.setId(1);
// bread.setName("Хлеб");
// bread.setPrice(69.90);
// System.out.println(milk.equals(bread));
// // builder
// Item item = Item.builder()
// .id(1)
// .name("Котлета")
// .price(100.0)
// .build();
////
// System.out.println(item);
// nonNull
Item
item
=
Item
.
builder
()
.
price
(
10.0
)
.
name
(
"Йогурт"
)
.
id
(
12
)
.
build
();
System
.
out
.
println
(
item
);
}
}
Back
|
FazBrowse Home
|
New Git URL