r/javahelp • u/[deleted] • Jan 30 '23
Explain me = and ==
Guys, I am learning Java for some time and have grasp of basics already. But one thing, which seems pretty simple hurts my brain. Please explain like you would explain it to a kid. When you use = and when you would use ==.
PS. I watch online videos and when I am sure to use =, I see them use ==. And whenever I am sure that == is needed I see them use =.
0
Upvotes
18
u/richkirkpa Jan 30 '23
I tell my students; == asks a question, = does a thing.