FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java-programming/javaUpdates/src/oops/HashSetDemo.java at master · 9146887137/java-programming · GitHub
9146887137
/
java-programming
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
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-programming
/
javaUpdates
/
src
/
oops
/
HashSetDemo.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (21 loc) · 807 Bytes
Breadcrumbs
java-programming
/
javaUpdates
/
src
/
oops
/
HashSetDemo.java
Copy path
File metadata and controls
29 lines (21 loc) · 807 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
package
oops
;
import
java
.
util
.
HashSet
;
import
java
.
util
.
TreeSet
;
public
class
HashSetDemo
{
public
static
void
main
(
String
[]
args
) {
HashSet
<
Bike
>
h
=
new
HashSet
<
Bike
>();
h
.
add
(
new
Bike
(
"bullet 350"
,
"bs6"
,
"royal enfield"
,
125
,
345000
));
h
.
add
(
new
Bike
(
"shine"
,
"bs6"
,
"honda"
,
125
,
95000
));
h
.
add
(
new
Bike
(
"hfdelux"
,
"bs4"
,
"hero"
,
125
,
98000
));
h
.
add
(
new
Bike
(
"rx100"
,
"bs6"
,
"bajaj"
,
125
,
91000
));
h
.
add
(
new
Bike
(
"unicorn"
,
"bs6"
,
"honda"
,
125
,
145000
));
h
.
add
(
new
Bike
(
"bullet 350"
,
"bs6"
,
"royal enfield"
,
125
,
345000
));
h
.
add
(
new
Bike
(
"rx100"
,
"bs4"
,
"bajaj"
,
125
,
90000
));
h
.
add
(
new
Bike
(
"rx100"
,
"bs6"
,
"bajaj"
,
125
,
90000
));
TreeSet
<
Bike
>
tr
=
new
TreeSet
<
Bike
>(
h
);
//System.out.println("tr");
for
(
Bike
b
:
tr
) {
System
.
out
.
println
(
b
);
}
}
}
Back
|
FazBrowse Home
|
New Git URL