Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Locale;
- public class myClass {
- // MAIN FUNCTION
- public static void main(String[] args){
- String a = "Apples";
- String b = "bucky";
- String c = "BUCKY";
- System.out.println(a.length());
- // Compare strings (not "==" ---> by reference)
- if(a.equals("Apples")){
- System.out.println("Yes! " + a);
- }
- if(b.equalsIgnoreCase(c)){
- System.out.println("Match! equalsIgnoreCase");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement