Thread
:
JAVA 101 help
View Single Post
#
2
31-10-2016, 08:47
Ethan_P
Registered User
FRC #1895 (Lambda Corps)
Team Role: Leadership
Join Date: Jan 2014
Rookie Year: 2013
Location: Virginia
Posts: 3
Re: JAVA 101 help
You have (door == "t"), this is not recommended.
Strings are objects, unlike ints and other primitive types. And because Strings are objects, you can't use '==' to compare two Strings. You would need to use
string1.equals(string2);
Ethan_P
View Public Profile
Find all posts by Ethan_P
Find CD-Media Photos by Ethan_P
Find CD-Media Papers by Ethan_P