{"id":449,"date":"2022-10-01T09:35:50","date_gmt":"2022-09-05T11:59:40","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/"},"modified":"2025-07-31T23:41:12","modified_gmt":"2025-07-31T14:41:12","slug":"kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/","title":{"rendered":"Kotlin\u306e\u30af\u30e9\u30b9 &#8211; Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf"},"content":{"rendered":"<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Kotlin\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u6982\u5ff5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002Kotlin\u306e\u30af\u30e9\u30b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u307e\u3059\u3002\u307e\u305f\u3001Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3001\u30a2\u30af\u30bb\u30b9\u4fee\u98fe\u5b50\u3001\u62bd\u8c61\u30af\u30e9\u30b9\u306b\u3064\u3044\u3066\u3082\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>Kotlin\u306e\u30af\u30e9\u30b9<\/h2>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648b15daa94e2bdf7bbbfb\/2-0.png\" alt=\"kotlin class, kotlin constructor\" \/><\/div>\n<pre class=\"post-pre\"><code>class FirstClass {\r\n}\r\n<\/code><\/pre>\n<p>\u6b21\u306e\u65b9\u6cd5\u3067\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>val firstClass =  FirstClass()\r\nvar new = FirstClass() \/\/here new is the name of the var.\r\n<\/code><\/pre>\n<p>Java\u3068\u306f\u7570\u306a\u308a\u3001Kotlin\u3067\u306fnew\u306f\u30ad\u30fc\u30ef\u30fc\u30c9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002Kotlin\u3067\u306f\u3001\u30af\u30e9\u30b9\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067final\u3068\u306a\u308a\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u4e0a\u8a18\u306e\u5b9a\u7fa9\u306eJava\u7248\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>public final class FirstClass {\r\n}\r\n<\/code><\/pre>\n<p>\u3057\u305f\u304c\u3063\u3066\u3001Kotlin\u306e\u30af\u30e9\u30b9\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7d99\u627f\u3067\u304d\u307e\u305b\u3093\u3002\u30af\u30e9\u30b9\u3092\u975efinal\u306b\u3059\u308b\u306b\u306f\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u300copen\u300d\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>open class Me{\r\n}\r\n<\/code><\/pre>\n<p>\u4ed6\u306e\u4eba\u3005\u304c\u3053\u306e\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b\u306e\u3092\u8a31\u53ef\u3059\u308b\u305f\u3081\u306b\u3001\u30aa\u30fc\u30d7\u30f3\u306a\u6ce8\u91c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>Kotlin \u30af\u30e9\u30b9\u306e\u4f8b<\/h3>\n<p>\u3044\u304f\u3064\u304b\u306e\u95a2\u6570\u3068\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u6301\u3064\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u305d\u306e\u30af\u30e9\u30b9\u306e\u95a2\u6570\u3084\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u65b9\u6cd5\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u30e1\u30f3\u30d0\u30fc\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3082\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>class User {\r\n\r\n    var loggedIn: Boolean = false\r\n    val cantChangeValue = \"Hi\"\r\n    \r\n    fun logOn() {\r\n        loggedIn = true\r\n    }\r\n    \r\n    fun logOff() {\r\n        loggedIn = false\r\n    }\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    val user = User()\r\n    println(user.loggedIn) \/\/false\r\n    user.logOn()\r\n    println(user.loggedIn) \/\/true\r\n    user.logOff()\r\n    println(user.loggedIn) \/\/false\r\n    user.cantChangeValue = \"Hey\" \/\/won't compile. Can't modify a final variable.\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u30e1\u30a4\u30f3\u306e\u6a5f\u80fd\u306fTest.kt\u30af\u30e9\u30b9\u306b\u5c5e\u3057\u3066\u3044\u307e\u3059\u3002 \u30e1\u30f3\u30d0\u30fc\u3084\u95a2\u6570\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30c9\u30c3\u30c8\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002val\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u30c9\u30c3\u30c8\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u3066\u518d\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<h3>Kotlin\u306einit<\/h3>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001Kotlin\u306einit\u30d6\u30ed\u30c3\u30af\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class User {\r\n    \r\n    init{\r\n        print(\"Class instance is initialised.\")\r\n    }\r\n\r\n    var loggedIn: Boolean = false\r\n    val cantChangeValue = \"Hi\"\r\n\r\n    fun logOn() {\r\n        loggedIn = true\r\n    }\r\n\r\n    fun logOff() {\r\n        loggedIn = false\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u6642\u306b\u3001init\u30d6\u30ed\u30c3\u30af\u5185\u306e\u30b3\u30fc\u30c9\u304c\u6700\u521d\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002init\u30d6\u30ed\u30c3\u30af\u306f\u3001\u6b21\u306b\u793a\u3059\u3088\u3046\u306a\u4efb\u610f\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u30af\u30e9\u30b9\u304c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u308b\u305f\u3073\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u30af\u30e9\u30b9\u5185\u306b\u306f\u8907\u6570\u306e\u521d\u671f\u5316\u30d6\u30ed\u30c3\u30af\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u793a\u3059\u3088\u3046\u306b\u3001\u3053\u308c\u3089\u306f\u9806\u6b21\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class MultiInit(name: String) {\r\n\r\n    init {\r\n        println(\"First initializer block that prints ${name}\")\r\n    }\r\n\r\n    init {\r\n        println(\"Second initializer block that prints ${name.length}\")\r\n    }\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n    var multiInit = MultiInit(\"Kotlin\")\r\n}\r\n\r\n\/\/Following is printed in the log console.\r\n\/\/First initializer block that prints Kotlin\r\n\/\/Second initializer block that prints 6\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001Kotlin\u306e\u30af\u30e9\u30b9\u3067\u306f\u3001also\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u5ba3\u8a00\u81ea\u4f53\u3067\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class MultiInit(name: String) {\r\n    val firstProperty = \"First property: $name\".also(::println)\r\n\r\n    init {\r\n        println(\"First initializer block that prints ${name}\")\r\n    }\r\n\r\n    val secondProperty = \"Second property: ${name.length}\".also(::println)\r\n\r\n    init {\r\n        println(\"Second initializer block that prints ${name.length}\")\r\n    }\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    var multiInit = MultiInit(\"Kotlin\")\r\n}\r\n\r\n\/\/Following gets printed.\r\n\/\/First property: Kotlin\r\n\/\/First initializer block that prints Kotlin\r\n\/\/Second property: 6\r\n\/\/Second initializer block that prints 6\r\n<\/code><\/pre>\n<h2>Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf<\/h2>\n<p>Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u7279\u5225\u306a\u30e1\u30f3\u30d0\u30fc\u95a2\u6570\u3067\u3042\u308a\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u521d\u671f\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306fJava\u3068\u6bd4\u8f03\u3057\u3066\u3001\u7570\u306a\u308b\u66f8\u304d\u65b9\u30fb\u69cb\u9020\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u4ee5\u4e0b\u306b\u793a\u3059\u3088\u3046\u306b\u30af\u30e9\u30b9\u306b\u306f\u7a7a\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class Student {\r\n    var name: String\r\n    val age : Int\r\n\r\n    init {\r\n        name = \"Anupam\"\r\n        age = 24\r\n    }\r\n\r\n    init {\r\n        name = \"Anupam Chugh\"\r\n        \/\/age = 26\r\n    }\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n    \r\n    val student = Student()\r\n    println(\"${student.name} age is ${student.age}\")\r\n    student.name = \"Your\"\r\n    \/\/student.age = 26 \/\/won't compile. age is val\r\n    println(\"${student.name} age is ${student.age}\")\r\n\r\n}\r\n\r\n\/\/Following is printed on the console:\r\n\/\/Anupam Chugh age is 24\r\n\/\/Your age is 24\r\n<\/code><\/pre>\n<h3>\u30d7\u30e9\u30a4\u30de\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30fc<\/h3>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001Kotlin\u306e\u4e3b\u8981\u306a\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u306f\u30af\u30e9\u30b9\u30d8\u30c3\u30c0\u30fc\u5185\u3067\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class User(var name: String, var isAdmin: Boolean) {\r\n\r\n    init {\r\n        name = name + \" @ JournalDev.com\"\r\n        println(\"Author Name is $name. Is Admin? $isAdmin\")\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\u4e3b\u306a\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u5b9a\u7fa9\u306f\u30af\u30e9\u30b9\u30d8\u30c3\u30c0\u306e\u5185\u90e8\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u81ea\u4f53\u3067\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u578b\uff08val\/var\uff09\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002\u6ce8\u610f\uff1a\u660e\u793a\u7684\u306bvar\u3068\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u9650\u308a\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u5f15\u6570\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067val\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class User(name: String, isAdmin: Boolean)\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001name\u3068isAdmin\u306e\u4e21\u65b9\u3092\u518d\u5272\u308a\u5f53\u3066\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u307e\u305f\u3001\u4ee5\u4e0b\u306b\u793a\u3059\u3088\u3046\u306b\u3001\u30af\u30e9\u30b9\u306e\u30e1\u30f3\u30d0\u30fc\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u5f15\u6570\u3092\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class User(name: String, val isAdmin: Boolean) {\r\n\r\n    var username  = name\r\n    val _isAdmin = isAdmin\r\n\r\n    init {\r\n        username= username + \" @ JournalDev.com\"\r\n        println(\"Author Name is $name. Is Admin? $_isAdmin\")\r\n    }\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    var user = User(\"Anupam\",false)\r\n    user.isAdmin = true \/\/won't compile since isAdmin is val\r\n    user._isAdmin = true \/\/won't compile. Same reason.\r\n    user = User(\"Pankaj\",true)\r\n}\r\n\r\n\/\/Following is printed in the log console.\r\n\/\/Author Name is Anupam. Is Admin? false\r\n\/\/Author Name is Pankaj. Is Admin? true\r\n<\/code><\/pre>\n<h3>Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024<\/h3>\n<p>Kotlin\u3067\u306f\u3001\u4ee5\u4e0b\u306b\u793a\u3059\u3088\u3046\u306b\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u81ea\u4f53\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class User(name: String, var website: String = \"JournalDev\") {\r\n\r\n    init {\r\n        println(\"Author $name writes at $website\")\r\n    }\r\n\r\n    init {\r\n        website = website + \".com\"\r\n        println(\"Author $name writes at $website\")\r\n    }\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    var user = User(\"Anupam\",\"JournalDev\")\r\n    user = User(\"Pankaj\",\"JournalDev\")\r\n}\r\n\r\n\/\/Following is printed on the console:\r\n\/\/Author Anupam writes at JournalDev\r\n\/\/Author Anupam writes at JournalDev.com\r\n\/\/Author Pankaj writes at JournalDev\r\n\/\/Author Pankaj writes at JournalDev.com\r\n<\/code><\/pre>\n<h3>\u526f\u6b21\u7684\u306a\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf<\/h3>\n<p>\u30bb\u30ab\u30f3\u30c0\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u306f\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u300cconstructor\u300d\u3092\u524d\u7f6e\u3057\u3066\u3001\u30af\u30e9\u30b9\u306e\u672c\u4f53\u5185\u306b\u8a18\u8ff0\u3055\u308c\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u540c\u3058\u3053\u3068\u3092\u5b9f\u8a3c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class Student {\r\n    var name: String\r\n    val age : Int\r\n\r\n    constructor(name: String, age: Int)\r\n    {\r\n        this.name = name\r\n        this.age = age\r\n    }\r\n\r\n    fun printDetails()\r\n    {\r\n        println(\"Name is $name and Age is $age\")\r\n    }\r\n\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    var student = Student(\"Anupam\", 24)\r\n    student.printDetails()\r\n}\r\n\r\n\/\/Following is printed in the console.\r\n\/\/Name is Anupam and Age is 24\r\n<\/code><\/pre>\n<p>\u30bb\u30ab\u30f3\u30c0\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u6700\u3082\u4e00\u822c\u7684\u306a\u4f7f\u7528\u65b9\u6cd5\u306f\u3001\u30af\u30e9\u30b9\u3092\u7570\u306a\u308b\u65b9\u6cd5\u3067\u521d\u671f\u5316\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u304d\u306b\u30b5\u30d6\u30af\u30e9\u30b9\u3067\u767a\u751f\u3057\u307e\u3059\u3002\u3082\u3057\u30af\u30e9\u30b9\u306b\u30d7\u30e9\u30a4\u30de\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u30bb\u30ab\u30f3\u30c0\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u305d\u306e\u5ba3\u8a00\u3067\u305d\u308c\u3092\u53c2\u7167\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u5ba3\u8a00\u304c\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class Student(var name: String, val age: Int) {\r\n\r\n    var skill: String\r\n\r\n    init {\r\n        skill = \"NA\"\r\n    }\r\n\r\n    constructor(name: String, age: Int, skill: String) : this(name, age) {\r\n        this.skill = skill\r\n    }\r\n\r\n    fun printDetails() {\r\n        if (skill.equals(\"NA\"))\r\n            println(\"Name is $name and Age is $age\")\r\n        else\r\n            println(\"Name is $name and Age is $age Skill is $skill\")\r\n    }\r\n}\r\n\r\n\/\/Following is printed in the log console:\r\n\/\/Name is Anupam and Age is 24\r\n\/\/Name is Anupam and Age is 24 Skill is Kotlin\r\n<\/code><\/pre>\n<p>\u521d\u671f\u5316\u30d6\u30ed\u30c3\u30af\u306f\u3001\u30e1\u30f3\u30d0\u30fc\u30d7\u30ed\u30d1\u30c6\u30a3\u30b9\u30ad\u30eb\u3092\u521d\u671f\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u30bb\u30ab\u30f3\u30c0\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u3001\u30d7\u30e9\u30a4\u30de\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b this \u3092\u4f7f\u7528\u3057\u3066\u59d4\u8b72\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30ab\u30b9\u30bf\u30e0\u306e\u30b2\u30c3\u30bf\u30fc\u3068\u30bb\u30c3\u30bf\u30fc<\/h3>\n<p>\u3053\u308c\u307e\u3067\u3001\u30af\u30e9\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u306f\u3001\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u30c9\u30c3\u30c8\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u3066\u30a2\u30af\u30bb\u30b9\u304a\u3088\u3073\u5909\u66f4\u3057\u3066\u304d\u307e\u3057\u305f\u3002\u30a2\u30af\u30bb\u30b9\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u65b9\u6cd5\u3092\u898b\u308b\u305f\u3081\u306b\u3001\u30bb\u30c3\u30c8\u3068\u30b2\u30c3\u30c8\u306e\u69cb\u6587\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>class Name{\r\n    var post: String = \"default\"\r\n    set(value) {if(!post.isNotEmpty()) {\r\n        throw IllegalArgumentException(\" Enter a valid name\")\r\n    }\r\n                field = value\r\n                print(value)\r\n    }\r\n\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    var name = Name()\r\n    name.post = \"Kotlin Classes\"\r\n    name.post = \"\"\r\n    name.post = \"Kotlin Data Classes Our Next Tutorial\"\r\n\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306f\u30ed\u30b0\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>Kotlin Classes\r\n\r\nException in thread \"main\" java.lang.IllegalArgumentException:  Enter a valid name\r\n\tat Name.setPost(Test.kt:16)\r\n\tat TestKt.main(Test.kt:78)\r\n<\/code><\/pre>\n<p>\u30d5\u30a3\u30fc\u30eb\u30c9\u5909\u6570\u306f\u30bb\u30c3\u30bf\u30fc\u3067\u4ee5\u524d\u306e\u5024\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u30b2\u30c3\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>class Name{\r\n    var post: String = \"default\"\r\n    set(value) {if(!post.isNotEmpty()) {\r\n        throw IllegalArgumentException(\" Enter a valid name\")\r\n    }\r\n                field = value\r\n    }\r\n    get() {\r\n        return field.capitalize()\r\n    }\r\n\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    var name = Name()\r\n    name.post = \"kotlin classes\"\r\n    println(name.post)\r\n    name.post = \"kotlin data Classes our next Tutorial\"\r\n    println(name.post)\r\n\r\n}\r\n\r\n\/\/Following is printed:\r\n\/\/Kotlin classes\r\n\/\/Kotlin data Classes our next Tutorial\r\n<\/code><\/pre>\n<p>capitalize()\u306f\u6587\u5b57\u5217\u306e\u6700\u521d\u306e\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u3057\u307e\u3059\u3002\u6ce8\u610f\uff1a\u30d7\u30ed\u30d1\u30c6\u30a3\u304cval\u306e\u5834\u5408\u3001\u30bb\u30c3\u30c8\u30e1\u30bd\u30c3\u30c9\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<h2>Kotlin\u306e\u53ef\u8996\u6027\u4fee\u98fe\u5b50<\/h2>\n<ul class=\"post-ul\">\n<li>Public : Any class, function, property, interface, or object that has this modifier is visible and can be accessed from anywhere.<\/li>\n<li>Private: A class\/function defined with this modifier can be only accessed within the same file. A member\/property in a class\/function with this modifier can be only accessed within that block.<\/li>\n<li>Protected : This modifier is same as private, except that it allows visibility and access within subclasses.<\/li>\n<li>Internal: A class\/interface\/function with this modifier is accessible only within the same module.<\/li>\n<\/ul>\n<p>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u3082\u53ef\u8996\u6027\u4fee\u98fe\u5b50\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002\u30d7\u30e9\u30a4\u30de\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u4fee\u98fe\u5b50\u3092\u5272\u308a\u5f53\u3066\u308b\u306b\u306f\u3001\u30af\u30e9\u30b9\u30d8\u30c3\u30c0\u30fc\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3068\u4e00\u7dd2\u306b\u30ad\u30fc\u30ef\u30fc\u30c9\u300cconstructor\u300d\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>class Student private constructor (var name: String, val age: Int) {\r\n\r\n    var skill: String\r\n\r\n    init {\r\n        skill = \"NA\"\r\n    }\r\n\r\n    constructor(name: String, age: Int, skill: String) : this(name, age) {\r\n        this.skill = skill\r\n    }\r\n\r\n    fun printDetails() {\r\n        if (skill.equals(\"NA\"))\r\n            println(\"Name is $name and Age is $age\")\r\n        else\r\n            println(\"Name is $name and Age is $age Skill is $skill\")\r\n    }\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    var student = Student(\"Anupam\",24,\"Kotlin\")\r\n    student.printDetails()\r\n}\r\n\r\n\/\/prints\r\n\/\/Name is Anupam and Age is 24 Skill is Kotlin\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u30af\u30e9\u30b9\u306e\u5916\u90e8\u304b\u3089\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u5225\u306e\u95a2\u6570\u5185\u3067\u306e\u307f\u3001\u30bb\u30ab\u30f3\u30c0\u30ea\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u4f7f\u7528\u3057\u3066\u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u62bd\u8c61\u7684\u306aKotlin\u30af\u30e9\u30b9<\/h2>\n<p>Java\u3068\u540c\u69d8\u306b\u3001Kotlin\u3067\u306fabstract\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u62bd\u8c61\u30af\u30e9\u30b9\u3092\u5ba3\u8a00\u3057\u307e\u3059\u3002\u62bd\u8c61\u30af\u30e9\u30b9\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3067\u304d\u307e\u305b\u3093\u304c\u3001\u30b5\u30d6\u30af\u30e9\u30b9\u306b\u3088\u3063\u3066\u7d99\u627f\u3055\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u62bd\u8c61\u30af\u30e9\u30b9\u306e\u30e1\u30f3\u30d0\u30fc\u306f\u975e\u62bd\u8c61\u3067\u3059\u304c\u3001\u660e\u793a\u7684\u306b\u6307\u5b9a\u3057\u306a\u3044\u9650\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>abstract class Person(name: String) {\r\n\r\n    init {\r\n        println(\"Abstract Class. init block. Person name is $name\")\r\n    }\r\n\r\n    abstract fun displayAge()\r\n}\r\n\r\nclass Teacher(name: String): Person(name) {\r\n\r\n    var age : Int\r\n\r\n    init {\r\n        age = 24\r\n    }\r\n\r\n    override fun displayAge() {\r\n        println(\"Non-abstract class displayAge function overridden. Age is $age\")\r\n    }\r\n}\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n\r\n    val person = Teacher(\"Anupam\")\r\n    person.displayAge()\r\n\r\n}\r\n\r\n\/\/Following is printed in the console.\r\n\/\/Abstract Class. init block. Person name is Anupam\r\n\/\/Non-abstract class. Age is 24\r\n<\/code><\/pre>\n<p>\u6ce8\u8a18\uff1a\u62bd\u8c61\u30af\u30e9\u30b9\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30aa\u30fc\u30d7\u30f3\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30b5\u30d6\u30af\u30e9\u30b9\u5316\u3092\u8a31\u53ef\u3059\u308b\u305f\u3081\u306e\u30aa\u30fc\u30d7\u30f3\u4fee\u98fe\u5b50\u306e\u8ffd\u52a0\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u30ad\u30fc\u30ef\u30fc\u30c9\u306f\u30b5\u30d6\u30af\u30e9\u30b9\u3067\u30e1\u30bd\u30c3\u30c9\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Kotlin\u30af\u30e9\u30b9\u306e\u57fa\u672c\u7684\u306a\u5185\u5bb9\u3092\u30ab\u30d0\u30fc\u3057\u307e\u3057\u305f\u3002\u30c7\u30fc\u30bf\u30af\u30e9\u30b9\u3001\u30b7\u30fc\u30eb\u30c9\u30af\u30e9\u30b9\u3001\u7d99\u627f\u306a\u3069\u3001\u307e\u3060\u307e\u3060\u305f\u304f\u3055\u3093\u306e\u8981\u7d20\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306b\u3064\u3044\u3066\u306f\u3001\u4eca\u5f8c\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u30ab\u30d0\u30fc\u3057\u307e\u3059\u3002\u53c2\u8003\u6587\u732e\uff1aKotlin\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Kotlin\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u6982\u5ff5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002Kotlin\u306e\u30af\u30e9\u30b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u307e\u3059\u3002\u307e\u305f\u3001Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3001\u30a2\u30af\u30bb\u30b9\u4fee\u98fe\u5b50\u3001\u62bd\u8c61\u30af\u30e9\u30b9\u306b\u3064\u3044\u3066\u3082\u8aac\u660e\u3057\u307e [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-449","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\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\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\u306e\u30af\u30e9\u30b9-kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\" \/>\n<meta property=\"og:description\" content=\"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\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\u306e\u30af\u30e9\u30b9-kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-05T11:59:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T14:41:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648b15daa94e2bdf7bbbfb\/2-0.png\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\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=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"22\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%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/\",\"name\":\"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2022-09-05T11:59:40+00:00\",\"dateModified\":\"2025-07-31T14:41:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"description\":\"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\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%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kotlin\u306e\u30af\u30e9\u30b9 &#8211; Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\"}]},{\"@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\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf - Blog - Silicon Cloud","description":"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\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\u306e\u30af\u30e9\u30b9-kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\/","og_locale":"ja_JP","og_type":"article","og_title":"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf","og_description":"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\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\u306e\u30af\u30e9\u30b9-kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-09-05T11:59:40+00:00","article_modified_time":"2025-07-31T14:41:12+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/65648b15daa94e2bdf7bbbfb\/2-0.png"}],"author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"22\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/","name":"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2022-09-05T11:59:40+00:00","dateModified":"2025-07-31T14:41:12+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"description":"Kotlin\u306e\u30af\u30e9\u30b9 - Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\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%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Kotlin\u306e\u30af\u30e9\u30b9 &#8211; Kotlin\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf"}]},{"@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\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/kotlin%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9-kotlin%e3%81%ae%e3%82%b3%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%bf\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/449","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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=449"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/449\/revisions"}],"predecessor-version":[{"id":40758,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/449\/revisions\/40758"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}