class
Bike
{
int
id
;
String
name
;
Bike
(
)
{
}
Bike
(
int
id
,
String
name
)
{
this
.
name
=
name
;
this
.
id
=
id
;
}
public
void
display
(
)
{
System
.
out
.
println
(
“id : “
+
id
)
;
System
.
out
.
println
(
“name : “
+
name
)
;
}
public
Bike
getBike
(
)
{
this
.
id
+=
10
;
this
.
name
+=
“Anh”
;
return
this
;
}
}
public
class
TEST
{
public
static
void
main
(
String
[
]
args
)
{
Bike
bike
=
new
Bike
(
1
,
“Tuan “
)
;
bike
.
display
(
)
;
bike
.
getBike
(
)
.
display
(
)
;
}
}