ã¨è¨ã£ã声ããèããã¾ããæååã®æ¯è¼ã«ã¤ãã¦ãããããã解説ããã¦ããã¾ãããã®è¨äºãè¦ãã°Javaè¨èªã§æååãæ¯è¼ããçµæãã©ããªããããããã¾ãï¼ ãªããJavaã®è¨äºã«ã¤ãã¦ã¯ããã¡ãã«ã¾ã¨ãã¦ãã¾ãã æååã®æ¯è¼ equalsã¡ã½ããã§æ¯è¼ãã ã¾ãã¯æååã®æ¯è¼æ¹æ³ã§ããStringã¯ã©ã¹ã®equalsã¡ã½ããã使ã£ã¦æååã®æ¯è¼ããã¦ã¿ã¾ãããã ãµã³ãã«ããã°ã©ã ï¼ public class Main { public static void main(String[] args) { String foo = "foo"; String bar = "bar"; if (foo.equals(bar)) { System.out.println("fooã¨barã¯ä¸ç·ã§ãã"); } else { System.out.println("fooã¨barã¯éãã¾ãã")
{{#tags}}- {{label}}
{{/tags}}