Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
What is the output of this code?
0
votes
asked
Jan 1, 2019
by
Team NSS
import java.util.HashSet;
class A {
public static void main(String[ ] args) {
HashSet<String> set = new HashSet<String>();
set.add("A");
set.add("B");
set.add("C");
System.out.println(set.size());
}
}
urgent
Please
log in
or register to answer this question.
3 Answers
0
votes
answered
Jan 1, 2019
by
shitalpatil1212
(
140
points)
Output for this program is 3
commented
Jan 2, 2019
by
fast
nivewowmbnbnbbnnb
Please
log in
or register to add a comment.
0
votes
answered
Jan 2, 2019
by
vijay
answer is 3 because just size of elements are invoked so size is 3
Please
log in
or register to add a comment.
0
votes
answered
Jan 3, 2019
by
NikhatShah
(
180
points)
Output of this program is 3
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...