æ¨æ¥ã¯éçºç°å¢ããªããKotlinã触ã£ããã¨ããªãç¶æ ãããKotlinã§ã³ã³ã½ã¼ã«ã«HelloWorldãåºåãã¾ããã
Â
ä»æ¥ã¯Kotlinã¨ã¯ãªããªã®ããã調ã¹ããã¨æãã¾ãã
Â
æ©éChatGPTã«è³ªå
ãKotlinã¨ã¯ãªãã§ããï¼ã
以ä¸åç
-------------------------------------------------------
Kotlinã¯ãJetBrainsã«ãã£ã¦éçºãããããã°ã©ãã³ã°è¨èªã§ãç¹ã«Androidã¢ããªéçºã§åºã使ç¨ããã¦ãã¾ãã以ä¸ã®ç¹å¾´ãããã¾ãï¼
ã·ã³ãã«ãªèª¬æ
- éçåä»ãã®ã¢ãã³ãªè¨èª
- Javaä»®æ³ãã·ã³ (JVM) ä¸ã§åä½ãã
- Androidå ¬å¼è¨èªã®ä¸ã¤ï¼2017å¹´ã«Googleãæ¡ç¨ï¼
詳細ãªèª¬æ
-
Javaäºææ§
-
ç°¡æ½ã
- åé·ãªã³ã¼ããæ¸ããããè¨è¨ããã¦ãããéçºå¹çãåä¸ãã¾ãã
- ä¾ãã°ã
getter
ãsetter
ãnull
ãã§ãã¯ãªã©ãç°¡åã«è¨è¿°ã§ãã¾ãã
-
å®å ¨æ§
- Nullå®å
¨ã®ä»çµã¿ãçµã¿è¾¼ã¾ãã¦ããã
NullPointerException
ã®ãªã¹ã¯ã軽æ¸ãã¾ãã
- Nullå®å
¨ã®ä»çµã¿ãçµã¿è¾¼ã¾ãã¦ããã
-
ã¢ãã³ãªæ©è½
- ã©ã ãå¼ãæ¡å¼µé¢æ°ããã¼ã¿ã¯ã©ã¹ãã³ã«ã¼ãã³ï¼éåæå¦çï¼ãªã©ãã¢ãã³ãªããã°ã©ãã³ã°è¦ç´ ãå¤æ°ãµãã¼ããã¦ãã¾ãã
-
ã¯ãã¹ãã©ãããã©ã¼ã éçº
- Kotlin Multiplatformã使ããã¨ã§ãiOSãWebãªã©ã®ã¢ããªã±ã¼ã·ã§ã³ãåãè¨èªã§éçºå¯è½ã
Kotlinã¯ç¹ã«ãAndroidã¢ããªéçºãå§ããã人ãã¢ãã³ãªéçºç°å¢ãæ±ããéçºè ã«ã¨ã£ã¦é åçãªé¸æè¢ã§ããèå³ãããã°ãå ·ä½çãªãµã³ãã«ã³ã¼ãããè¦ãã§ãã¾ãï¼
-------------------------------------------------------
Â
ã¨ã®ãã¨ã
Javaã¨äºææ§ãããã¨ãããã¨ã¯ãæ¢åã®Javaã¢ããªããKotlinãå°å ¥ãããããã§ããã
ç°¡æ½ãã«é¢ãã¦ã¯ããã®å¾Kotlinãå¦ãã§ããããã§å®æã§ããããããã¾ãããç§ã¨ãã¦ã¯ãã£ããããã°ã©ãã³ã°ãããã¨ãããã®ã¯PHPã¨å¤ããã¼ã¸ã§ã³ã®.NETç³»ãªã®ã§ãããã¨æ¯è¼ã§ããã¨ããè ã«è½ã¡ããã¨æãã¾ãã
Nullå®å ¨ã£ã¦ããèããã©ããã¾ãããã£ã¦ãªãã£ãã®ã§èª¿ã¹ã¾ãã
nullå®å ¨ã§ãªãè¨èªã¯ããã¯ãã¬ã¬ã·ã¼è¨èªã #Python - Qiita
ãªãã»ã©ãnullãå
¥ããã©ãããã³ã¼ãã£ã³ã°æã«æè¨ãã¦ããªãã¹ãã¨ã©ã¼ãå®è¡æã§ã¯ãªãã³ã³ãã¤ã«æã«æé¤ã§ããããã«ãã¦ããããã§ãããNullPointerExceptionãçºçãããããªãããã§ç´ æ´ãããã§ããã
ã¢ãã³ãªæ©è½ããã»ã¼ããããªãã§ãããä»åº¦å¦ç¿ãã¾ãã
ã¯ãã¹ãã©ãããã©ã¼ã éçºã¯ããããã¾ãããXamarinã¨ãReactNativeã¿ãããªã¤ã¡ã¼ã¸ï¼
å¦ç¿ãã¦ã¿ã¦ããããã¯ç解ãã¾ãããJavaã¨è¦ªåæ§ãé常ã«é«ãéçåä»ãè¨èªã§ããã
Â
ã¡ãã£ã¨ã¾ã触ããããªã£ãã®ã§ãã³ã¼ãã£ã³ã°ã«ç§»ãã¾ãã
IntelliJ Ideaã30æ¥ãã使ããªãããã ã£ãã®ã§ãVSCodeã§éçºã§ããããã«YouTubeã§kinoã³ã¼ãã£ã³ã°ããã®åç»ãè¦ãªããç°å¢æ§ç¯ãæ¹ãã¦ãã¾ãã
Java23ãã¢ã³ã¤ã³ã¹ãã¼ã«ãã¦ã17ãã¤ã³ã¹ãã¼ã«ãã¾ããããã«ãKotolinãã¤ã³ã¹ãã¼ã«ãã¾ãããã¼ã¸ã§ã³ã¯2.1ã
VSCodeã§å®è¡ã§ããããã«ãåç»å ã«ãã£ãVSCodeã®Extensionãå ¥ãã¦ããã¾ãã
åç»ã¯ãã®åã¾ã§è¦ã¦ãå®è¡ã§ãã
Â
ã§ããï¼
Â
ãã£ã±ãããã°ã©ãã³ã°ã¯åãã¨æ¥½ããã§ããï½
ææ¥ä»¥éã¯ãã®åç»ã®ç¶ããã¡ãã£ã¨è¦ã¦ããããã¨æãã¾ãã
楽ããã