{"id":594,"date":"2023-06-13T04:38:47","date_gmt":"2023-11-28T23:18:31","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/"},"modified":"2025-08-01T00:54:26","modified_gmt":"2025-07-31T15:54:26","slug":"kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/","title":{"rendered":"Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002"},"content":{"rendered":"<p>\u4eca\u65e5\u306f\u3001Kotlin\u306e\u30d7\u30ea\u30f3\u30c8\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3084\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u306e\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u306e\u53d6\u5f97\u3068\u89e3\u6790\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002\u3055\u3089\u306b\u3001Kotlin REPL\u306b\u3064\u3044\u3066\u3082\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>Kotlin\u306e\u30d7\u30ea\u30f3\u30c8\u95a2\u6570<\/h2>\n<p>\u753b\u9762\u306b\u4f55\u304b\u3092\u51fa\u529b\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u6b21\u306e2\u3064\u306e\u65b9\u6cd5\u304c\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>print()<\/li>\n<li>println()<\/li>\n<\/ul>\n<p>print\u6587\u306f\u3001\u305d\u308c\u306b\u542b\u307e\u308c\u308b\u5168\u3066\u306e\u3082\u306e\u3092\u753b\u9762\u306b\u51fa\u529b\u3057\u307e\u3059\u3002println\u6587\u306f\u3001\u51fa\u529b\u306e\u6700\u5f8c\u306b\u6539\u884c\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002print\u6587\u306f\u3001\u5185\u90e8\u3067System.out.print\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u3001print\u6587\u306e\u52d5\u4f5c\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) {\r\nvar x = 5\r\nprint(x++)\r\nprintln(\"Hello World\")\r\nprint(\"Do dinasours still exist?\\n\")\r\nprint(false)\r\nprint(\"\\nx is $x.\")\r\nprintln(\" x Got Updated!!\")\r\nprint(\"Is x equal to 6?: ${x == 6}\\n\")    \r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/6-0.png\" alt=\"kotlin print println functions\" \/><\/div>\n<h3>\u30ea\u30c6\u30e9\u30eb\u3068\u5f0f\u3092\u56de\u907f\u3059\u308b\u3002<\/h3>\n<p>\u30c9\u30eb\u8a18\u53f7\u3092\u56de\u907f\u3057\u3001${expression}\u3092\u8a08\u7b97\u3067\u306f\u306a\u304f\u305f\u3060\u306e\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u3046\u305f\u3081\u306b\u306f\u3001\u305d\u308c\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308c\u3070\u3088\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) {\r\nval y = \"\\${2 == 5}\"\r\nprintln(\"y = ${y}\")       \r\nprintln(\"Do we use $ to get variables in Python or PHP? Example: ${'$'}x and ${'$'}y\")\r\nval z = 5\r\nvar str = \"$z\"\r\nprintln(\"z is $str\")\r\nstr = \"\\$z\"\r\nprintln(\"str is $str\")\r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/10-0.png\" alt=\"kotlin print statements escaping literals\" \/><\/div>\n<h3>\u95a2\u6570\u306e\u5024\u3092\u5370\u5237\u3059\u308b\u6a5f\u80fd<\/h3>\n<pre class=\"post-pre\"><code>fun sumOfTwo(a: Int, b: Int) : Int{\r\n    return a + b\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\nval a = 2\r\nval b = 3\r\nprintln(\"Value of ${'$'}a and ${'$'}b is : ${sumOfTwo(a,b)}\") \r\nprintln(println(\"Printing Value of ${'$'}a and ${'$'}b is : ${sumOfTwo(a,b)}\"))    \r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/13-0.png\" alt=\"kotlin print statements printing functions\" \/><\/div>\n<h2>Kotlin\u306e\u30e6\u30fc\u30b6\u30fc\u5165\u529b<\/h2>\n<p>\u30e6\u30fc\u30b6\u30fc\u306e\u5165\u529b\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e2\u3064\u306e\u65b9\u6cd5\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>readLine()<\/li>\n<li>Scanner class<\/li>\n<\/ul>\n<p>\u6ce8\u610f\uff1a\u30e6\u30fc\u30b6\u30fc\u306e\u5165\u529b\u306b\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002REPL\u307e\u305f\u306fIntelliJ\u306e\u3044\u305a\u308c\u304b\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306fIntelliJ\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>readLine()\u3092\u4f7f\u7528\u3059\u308b<\/h3>\n<p>readLine()\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u7d42\u308f\u308a\u306a\u3069\u3067\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u306e\u3042\u308bnull\u5024\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u3001\u578bString?\u306e\u5024\u3092\u8fd4\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u3001readLine()\u3092\u4f7f\u7528\u3057\u305f\u4f8b\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) {\r\n    println(\"Enter your name:\")\r\n    var name = readLine()\r\n    print(\"Length is ${name?.length}\")\r\n}\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u306eString\u578b\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001nullable\u306a\u578b\u3092\u30a2\u30f3\u30e9\u30c3\u30d7\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002String?\u3092String\u306b\u5f37\u5236\u7684\u306b\u5909\u63db\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5024\u304cnull\u3067\u306a\u3044\u3053\u3068\u304c\u7d76\u5bfe\u306b\u78ba\u5b9f\u306a\u5834\u5408\u306b\u306e\u307f\u300c!!\u300d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u306f\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u5165\u529b\u3092Integer\u306b\u5909\u63db\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) {\r\nvar number = readLine()\r\ntry {\r\n        println(\"Number multiply by 5 is ${number?.toInt()?.times(5)}\")\r\n    } catch (ex: NumberFormatException) {\r\n        println(\"Number not valid\")\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>Nullable\u306a\u578b\u3092\u4f7f\u3063\u3066\u3001\u307e\u305atoInt()\u3092\u4f7f\u3063\u3066Int\u578b\u306b\u5909\u63db\u3059\u308b\u305f\u3081\u306b?.\u6f14\u7b97\u5b50\u3092\u4f7f\u3044\u307e\u3059\u3002\u305d\u3057\u3066\u305d\u308c\u30925\u500d\u3057\u307e\u3059\u3002\u9023\u7d9a\u3057\u3066\u5165\u529b\u3092\u8aad\u3080\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bdo while\u30eb\u30fc\u30d7\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>    do {\r\n        line = readLine()\r\n\r\n        if (line == \"quit\") {\r\n            println(\"Closing Program\")\r\n            break\r\n        }\r\n\r\n        println(\"Echo $line\")\r\n\r\n    } while (true)\r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/25-0.png\" alt=\"kotlin print statements loop\" \/><\/div>\n<h3>split\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u3066\u8907\u6570\u306e\u5024\u3092\u8aad\u307f\u53d6\u308b<\/h3>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u533a\u5207\u308a\u6587\u5b57\u3067\u5206\u3051\u3089\u308c\u305f\u8907\u6570\u306e\u5024\u3092\u8aad\u307f\u53d6\u308a\u3001\u305d\u308c\u3089\u3092\u30bf\u30d7\u30eb\u5f62\u5f0f\u3067\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>fun readIntegers(separator: Char = ',')\r\n        = readLine()!!.split(separator).map(String::toInt)\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n    println(\"Enter your values:\")\r\n    try {\r\n        val (a, b, c) = readLine()!!.split(' ')\r\n        println(\"Values are $a $b and $c\")\r\n    } catch (ex: IndexOutOfBoundsException) {\r\n        println(\"Invalid. Missing values\")\r\n    }\r\n\r\n    try {\r\n        val (x, y, z) = readIntegers()\r\n        println(\"x is $x y is $y z is $z\")\r\n    } catch (ex: IndexOutOfBoundsException) {\r\n        println(\"Invalid. Missing values\")\r\n    }\r\n    catch (ex: NumberFormatException) {\r\n        println(\"Number not valid\")\r\n    }\r\n\r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/29-0.png\" alt=\"kotlin print statements split and exceptions\" \/><\/div>\n<pre class=\"post-pre\"><code>val ints: List&lt;String&gt;? = readLine()?.split(\"|\".toRegex())\r\nprintln(ints)\r\n<\/code><\/pre>\n<h3>Kotlin\u306eScanner\u30af\u30e9\u30b9<\/h3>\n<p>\u5165\u529b\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306b\u3001\u6a19\u6e96\u5165\u529b\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u5165\u529b\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306bScanner(System.`in`)\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u540c\u3058\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) {\r\n    val reader = Scanner(System.`in`)\r\n    print(\"Enter a number: \")\r\n\r\n    \/\/ nextInt() reads the next integer. next() reads the String\r\n    var integer:Int = reader.nextInt()\r\n\r\n    println(\"You entered: $integer\")\r\n<\/code><\/pre>\n<p>reader.nextInt()\u306f\u6b21\u306e\u6574\u6570\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002reader.next()\u306f\u6b21\u306e\u6587\u5b57\u5217\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002reader.nextFloat()\u306f\u6b21\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002\u307e\u305f\u3001reader.nextLine()\u306fScanner\u3092\u6b21\u306e\u884c\u306b\u6e21\u3057\u3001\u30d0\u30c3\u30d5\u30a1\u3082\u30af\u30ea\u30a2\u3057\u307e\u3059\u3002\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u76f4\u63a5\u30d7\u30ea\u30f3\u30c8\u6587\u5185\u3067\u3055\u307e\u3056\u307e\u306a\u7a2e\u985e\u306e\u5165\u529b\u3092\u8aad\u307f\u53d6\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>import java.util.*\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    val reader = Scanner(System.`in`)\r\n    print(\"Enter a number: \")\r\n\r\n    try {\r\n        var integer: Int = reader.nextInt()\r\n        println(\"You entered: $integer\")\r\n    } catch (ex: InputMismatchException) {\r\n        println(\"Enter valid number\")\r\n    }\r\n    enterValues(reader)\r\n    \/\/move scanner to next line else the buffered input would be read for the next here only.\r\n    reader.nextLine()\r\n    enterValues(reader)\r\n}\r\n\r\nfun enterValues(reader: Scanner) {\r\n    println(\"Enter a float\/boolean :\")\r\n    try {\r\n        print(\"Values: ${reader.nextFloat()}, ${reader.nextBoolean()}\")\r\n    } catch (ex: InputMismatchException) {\r\n        println(\"First value should be a float, second should be a boolean. (Separated by enter key)\")\r\n    }\r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/36-0.png\" alt=\"kotlin scanner class\" \/><\/div>\n<h2>\u30b3\u30c8\u30ea\u30f3REPL<\/h2>\n<p>REPL\uff08Read-Eval-Print-Loop\uff09\u306f\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u30b7\u30a7\u30eb\u3067\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u3092\u76f4\u63a5\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u30bf\u30fc\u30df\u30ca\u30eb\/\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067Kotlin\u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/h3>\n<p>\u3053\u3061\u3089\u3067\u793a\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001Mac\/Windows\/Ubuntu\u3067\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u901a\u5e38\u3001Mac\u3067\u306f\u3001HomeBrew\u3092\u4f7f\u7528\u3057\u3066\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067Kotlin\u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>brew update\r\nbrew install kotlin\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/42-0.png\" alt=\"kotlin REPL\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u65e5\u306f\u3001Kotlin\u306e\u30d7\u30ea\u30f3\u30c8\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3084\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u306e\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u306e\u53d6\u5f97\u3068\u89e3\u6790\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002\u3055\u3089\u306b\u3001Kotlin REPL\u306b\u3064\u3044\u3066\u3082\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002 Kotlin\u306e\u30d7\u30ea\u30f3\u30c8\u95a2\u6570 \u753b\u9762\u306b\u4f55\u304b\u3092\u51fa\u529b\u3059\u308b\u305f\u3081 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-594","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Kotlin\u306eprint()println()readLine()ScannerREPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin\u306eprint\u3001println\u3001readline\u3001scanner\u3001repl\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002\" \/>\n<meta property=\"og:description\" content=\"Kotlin\u306eprint()println()readLine()ScannerREPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin\u306eprint\u3001println\u3001readline\u3001scanner\u3001repl\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-28T23:18:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T15:54:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/6-0.png\" \/>\n<meta name=\"author\" content=\"\u6d77\u6597, \u8475\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6d77\u6597, \u8475\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"11\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/\",\"name\":\"Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-11-28T23:18:31+00:00\",\"dateModified\":\"2025-07-31T15:54:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\"},\"description\":\"Kotlin\u306eprint()println()readLine()ScannerREPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\",\"name\":\"\u6d77\u6597, \u8475\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"caption\":\"\u6d77\u6597, \u8475\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002 - Blog - Silicon Cloud","description":"Kotlin\u306eprint()println()readLine()ScannerREPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin\u306eprint\u3001println\u3001readline\u3001scanner\u3001repl\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\/","og_locale":"ja_JP","og_type":"article","og_title":"Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002","og_description":"Kotlin\u306eprint()println()readLine()ScannerREPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin\u306eprint\u3001println\u3001readline\u3001scanner\u3001repl\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-11-28T23:18:31+00:00","article_modified_time":"2025-07-31T15:54:26+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65649504daa94e2bdf7bf583\/6-0.png"}],"author":"\u6d77\u6597, \u8475","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u6d77\u6597, \u8475","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"11\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/","name":"Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-11-28T23:18:31+00:00","dateModified":"2025-07-31T15:54:26+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6"},"description":"Kotlin\u306eprint()println()readLine()ScannerREPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Kotlin\u306eprint()\u3001println()\u3001readLine()\u3001Scanner\u3001REPL\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u3067\u7d50\u69cb\u3067\u3059\u300d\u3002"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6","name":"\u6d77\u6597, \u8475","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","caption":"\u6d77\u6597, \u8475"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%aeprint%e3%80%81println%e3%80%81readline%e3%80%81scanner%e3%80%81repl%e3%82%92%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%a7%e8%a8%80%e3%81%84%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%8f%e3%81%a0\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=594"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/594\/revisions"}],"predecessor-version":[{"id":42580,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/594\/revisions\/42580"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}