{"id":159,"date":"2024-08-23T10:39:08","date_gmt":"2024-08-23T01:39:08","guid":{"rendered":"https:\/\/techfun.cc\/?p=159"},"modified":"2025-06-02T12:39:31","modified_gmt":"2025-06-02T03:39:31","slug":"java_base_basic_java_1","status":"publish","type":"post","link":"https:\/\/techfun.cc\/java-base\/java_base_basic_java_1.html","title":{"rendered":"Java\u306e\u57fa\u672c\uff08\u524d\u7de8\uff09"},"content":{"rendered":"<h3 class=\"Heading Title Title--m\" id=\"Bookmark-1\"><span class=\"Num\">1.<\/span>\u672c\u7ae0\u3067\u306e\u5b66\u7fd2\u9805\u76ee<\/h3>\n<p>Java\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8a18\u8ff0\u3059\u308b\u4e0a\u3067\u6700\u4f4e\u9650\u5fc5\u8981\u306a\u57fa\u672c\u30eb\u30fc\u30eb\u3068\u57fa\u672c\u6587\u6cd5\u3092\u5b66\u7fd2\u3059\u308b\u300cJava\u306e\u57fa\u672c\u300d\u306e\u524d\u7de8\u3067\u3059\u3002<br \/>\n\u524d\u7de8\u3067\u306f\u3001\u69cb\u6587\u30eb\u30fc\u30eb\u3084\u30c7\u30fc\u30bf\u578b\u3001\u6f14\u7b97\u5b50\u306a\u3069\u3092\u6271\u3044\u307e\u3059\u3002<br \/>\n\u6761\u4ef6\u51e6\u7406\u3084\u7e70\u308a\u8fd4\u3057\u3092\u6271\u3046\u5f8c\u7de8\u306f<a href=\"https:\/\/techfun.cc\/java-base\/java_base_basic_java_2.html\">\u3053\u3061\u3089<\/a>\u3088\u308a\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Separator\">\n<div class=\"Separator__child\"><\/div>\n<\/div>\n<h3 class=\"Heading Title Title--m\" id=\"Bookmark-2\"><span class=\"Num\">2.<\/span>\u672c\u7ae0\u306e\u8b1b\u7fa9<\/h3>\n<p>\u672c\u7ae0\u3067\u5b66\u7fd2\u3059\u308b\u5185\u5bb9\u3092\u52d5\u753b\u3068\u3057\u3066\u307e\u3068\u3081\u305f\u3082\u306e\u3067\u3059\u3002\u4e00\u901a\u308a\u898b\u7d42\u308f\u3063\u305f\u5f8c\u3001\u5b66\u7fd2\u306b\u5165\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"Video-block\">\n<div class=\"Video-block__title\">\u8b1b\u7fa9:Java\u306e\u57fa\u672c\u2460<\/div>\n<div class=\"Video-block__video Youtube\">\n\t\t<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/zKy0VJFf9i8?si=83hvadknot8jeIJN&#038;rel=0\"\n\t\t\ttitle=\"YouTube video player\" frameborder=\"0\"\n\t\t\tallow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n\t\t\treferrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n\t<\/div>\n<\/div>\n<div class=\"Separator\">\n<div class=\"Separator__child\"><\/div>\n<\/div>\n<h3 class=\"Heading Title Title--m\" id=\"Bookmark-3\"><span class=\"Num\">3.<\/span>Java\u306e\u69cb\u6587\u30eb\u30fc\u30eb<\/h3>\n<p>Java\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f\u306b\u3042\u305f\u3063\u3066\u3001\u3044\u304f\u3064\u304b\u6c17\u3092\u3064\u3051\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u70b9\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-3-1\"><span class=\"Num\">3.1.<\/span>\u4e00\u3064\u306e\u547d\u4ee4\u6587\u306e\u7d42\u308f\u308a<\/h4>\n<p>\u3053\u308c\u304b\u3089\u3001\u591a\u304f\u306e\u547d\u4ee4\uff08\u30b3\u30de\u30f3\u30c9\uff09\u3092\u5b66\u7fd2\u3057\u307e\u3059\u304c\u3001\u57fa\u672c\u7684\u306b\u4e00\u3064\u306e\u547d\u4ee4\u6587\u306e\u7d42\u308f\u308a\u306b\u306f\u3001\u300c;\uff08\u30bb\u30df\u30b3\u30ed\u30f3\uff1a\u534a\u89d2\uff09\u300d\u3092\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u5168\u89d2\u3001\u534a\u89d2\u3082\u5224\u5b9a\u3057\u307e\u3059\u306e\u3067\u3001\u6c17\u3092\u3064\u3051\u3066\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>System.out.println(\"\u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\"); \/\/ \u30bb\u30df\u30b3\u30ed\u30f3\u3092\u3064\u3051\u308b<\/code><\/pre>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-3-2\"><span class=\"Num\">3.2.<\/span>\u62ec\u5f27<\/h4>\n<p>Java\u306f\u3001\u69d8\u3005\u306a\u62ec\u5f27\u3092\u7528\u3044\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3059\u3002\u4e00\u3064\u4e00\u3064\u306e\u62ec\u5f27\u306b\u306f\u3001\u305d\u308c\u305e\u308c\u610f\u5473\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u9069\u5207\u306b\u62ec\u5f27\u3092\u4f7f\u7528\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<br \/>\n\u4e00\u7e8f\u307e\u308a\u306e\u51e6\u7406\u3092\u300c\uff5b\uff5d\u300d\u3068\u3044\u3046\u62ec\u5f27\u3067\u56f2\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>public class HelloWorld { \/\/ \u300c\u30af\u30e9\u30b9\u300d\u3068\u3044\u3046\u51e6\u7406\u306e\u59cb\u307e\u308a\r\n\t\/**\r\n\t * @param args\r\n\t *\/\r\n\tpublic static void main(String[] args) { \/\/ \u300c\u30e1\u30bd\u30c3\u30c9\u300d\u3068\u3044\u3046\u51e6\u7406\u306e\u59cb\u307e\u308a\r\n\t\tSystem.out.println(\"\u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\");\r\n\t} \/\/ \u300c\u30e1\u30bd\u30c3\u30c9\u300d\u3068\u3044\u3046\u51e6\u7406\u306e\u7d42\u308f\u308a\r\n} \/\/ \u300c\u30af\u30e9\u30b9\u300d\u3068\u3044\u3046\u51e6\u7406\u306e\u7d42\u308f\u308a<\/code><\/pre>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-3-3\"><span class=\"Num\">3.3.<\/span>\u30a4\u30f3\u30c7\u30f3\u30c8<\/h4>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8a18\u8ff0\u3059\u308b\u3068\u304d\u306b\u306f\u3001\u4e00\u5b9a\u306e\u30eb\u30fc\u30eb\u306b\u5f93\u3063\u3066\u3001\u30b9\u30da\u30fc\u30b9\u3084\u6539\u884c\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\uff08\u6570\u6587\u5b57\u5206\u306e\u30b9\u30da\u30fc\u30b9\uff09\u3092\u5165\u308c\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u8aad\u307f\u3084\u3059\u3044\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3057\u3001\u4e00\u3064\u306e\u547d\u4ee4\uff08\u30b3\u30de\u30f3\u30c9\uff09\u306e\u9014\u4e2d\u3067\u3001\u4e0d\u7528\u610f\u306b\u30b9\u30da\u30fc\u30b9\u3084\u6539\u884c\u3092\u5165\u308c\u308b\u3068\u3001\u30a8\u30e9\u30fc\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u6c17\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ \u547d\u4ee4\u306e\u9014\u4e2d\u3067\u6539\u884c\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\r\npublic class HelloWorld {\r\n\tpublic static void main(String[] args) {\r\n\t\tSystem.out.print \/\/ \"System.out.println\"\u3068\u3044\u3046\u547d\u4ee4\u306e\u9014\u4e2d\u3067\u6539\u884c\r\n\t\t\tln(\"\u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\");\r\n\t\t}\r\n}<\/code><\/pre>\n<p>Java\u306e\u5834\u5408\u3001\u300c\uff5b\uff5d\u300d\u306e\u62ec\u5f27\u306e\u4e2d\u306f\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\u3092\u5165\u308c\u3066\u3001\u4e00\u6bb5\u53f3\u306b\u30b7\u30d5\u30c8\u3059\u308b\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3068\u5206\u304b\u308a\u3084\u3059\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ \u300c\uff5b\uff5d\u300d\u306e\u62ec\u5f27\u306e\u4e2d\u306f\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\uff08\u30bf\u30d6\u30ad\u30fc\u3067\u7a7a\u767d\uff09\u3092\u5165\u308c\u308b\r\npublic class HelloWorld {\r\n\tpublic static void main(String[] args) {  \u2190\u30a4\u30f3\u30c7\u30f3\u30c8\r\n\t\tSystem.out.println(\"\u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\");  \u2190\u30a4\u30f3\u30c7\u30f3\u30c8\r\n\t}\r\n}<\/code><\/pre>\n<p>\u672c\u8b1b\u5ea7\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u306a\u3069\u3092\u898b\u3066\u3001\u8aad\u307f\u3084\u3059\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-3-4\"><span class=\"Num\">3.4.<\/span>\u30b3\u30e1\u30f3\u30c8<\/h4>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u30bd\u30fc\u30b9\u306f\u3001\u9577\u304f\u306a\u3063\u305f\u308a\u8907\u96d1\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u3068\u3001\u51e6\u7406\u5185\u5bb9\u304c\u5206\u304b\u308a\u96e3\u304f\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30b3\u30e1\u30f3\u30c8\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u4e2d\u306b\u8a18\u8ff0\u3059\u308b\u6ce8\u91c8\u3067\u3059\u3002<br \/>\n\u51e6\u7406\u5185\u5bb9\u3092\u7c21\u6f54\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\uff08\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4fee\u6b63\uff09\u304c\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u901a\u5e38\u3001\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3067\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30de\u3068\u306f\u5225\u306e\u30d7\u30ed\u30b0\u30e9\u30de\u304c\u4fee\u6b63\u3092\u884c\u3046\u3053\u3068\u304c\u591a\u3044\u305f\u3081\u3001\u30b3\u30e1\u30f3\u30c8\u306f\u91cd\u8981\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30b3\u30e1\u30f3\u30c8\u3068\u3057\u3066\u8a18\u8ff0\u3055\u308c\u305f\u90e8\u5206\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u3057\u3066\u5b9f\u884c\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u30b3\u30e1\u30f3\u30c8\u306f\u3001\u4e3b\u306b\u6b21\u306e2\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol class=\"Base-list Base-list--ol\">\n<li class=\"Base-list__child\">\n\t\t\u4e00\u884c\u30b3\u30e1\u30f3\u30c8<br \/>\n\t\t\u30b3\u30e1\u30f3\u30c8\u306e\u5148\u982d\u306b\u300c\/\/\u300d\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u300c\/\/\u300d\u304b\u3089\u6539\u884c\u307e\u3067\u304c\u30b3\u30e1\u30f3\u30c8\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ 1\u884c\u30b3\u30e1\u30f3\u30c8\uff1a\u3053\u308c\u306f\u30b3\u30e1\u30f3\u30c8\u306e\u305f\u3081\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u3057\u3066\u51e6\u7406\u3055\u308c\u307e\u305b\u3093\u3002\r\npublic class HelloWorld {\r\n\tpublic static void main(String[] args) { \/\/ \u30e1\u30a4\u30f3\u30e1\u30bd\u30c3\u30c9\uff08\u30b3\u30e1\u30f3\u30c8\uff09\r\n\t\tSystem.out.println(\"\u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\"); \/\/ \u300c\u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\u300d\u3092\u753b\u9762\u8868\u793a\uff08\u30b3\u30e1\u30f3\u30c8\uff09\r\n\t}\r\n}<\/code><\/pre>\n<\/li>\n<li class=\"Base-list__child\">\n\t\t\u8907\u6570\u884c\u30b3\u30e1\u30f3\u30c8<br \/>\n\t\t\u8907\u6570\u884c\u306b\u6e21\u308b\u30b3\u30e1\u30f3\u30c8\u306b\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u6587\u8a00\u3092\u300c\/*\u300d\u304b\u3089\u300c*\/\u300d\u3067\u56f2\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/* \u8907\u6570\u884c\u30b3\u30e1\u30f3\u30c8\u3067\u3059\u3002\u8907\u6570\u884c\u306b\u6e21\u308b\u3068\u304d\u306b\u4f7f\u3044\u307e\u3059\u3002\r\n *  \u3053\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059\u3002\r\n *  \u3053\u3061\u3089\u3082\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u3057\u3066\u306f\u51e6\u7406\u3055\u308c\u307e\u305b\u3093\u3002\r\n *\/\r\npublic class HelloWorld {\r\n\tpublic static void main(String[] args) {\r\n\t\tSystem.out.println(\"\u3053\u3093\u306b\u3061\u306f\u4e16\u754c\uff01\");\r\n\t}\r\n}<\/code><\/pre>\n<\/li>\n<\/ol>\n<div class=\"Separator\">\n<div class=\"Separator__child\"><\/div>\n<\/div>\n<h3 class=\"Heading Title Title--m\" id=\"Bookmark-4\"><span class=\"Num\">4.<\/span>\u6587\u5b57\u5217\u306e\u753b\u9762\u8868\u793a<\/h3>\n<p>\u300c\u306f\u3058\u3081\u3066\u306eJava\u300d\u306e\u7ae0\u3067\u8a18\u8ff0\u3057\u305f\u6587\u5b57\u5217\u3092\u753b\u9762\u8868\u793a\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306e\u5fa9\u7fd2\u3092\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u6587\u5b57\u5217\u3092\u8868\u793a\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u69cb\u6587\u306b\u306a\u308a\u307e\u3059\u3002\u300c&quot;&quot;\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u306e\u4e2d\u306b\u51fa\u529b\u3057\u305f\u3044\u6587\u5b57\u5217\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001\u4eca\u5f8c\u3082\u3088\u304f\u4f7f\u3044\u307e\u3059\u306e\u3067\u3001\u899a\u3048\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>System.out.println(\"\u51fa\u529b\u3057\u305f\u3044\u6587\u5b57\u5217\");<\/code><\/pre>\n<p>\u300cprintln\u300d\u306e\u300cln\uff08\u30a8\u30eb\u30fb\u30a8\u30cc\uff09\u300d\u306f\u3001\u6539\u884c\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<br \/>\n\u4ee5\u4e0b\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u300c\u3042\u3044\u3046\u3048\u304a\u300d\u3067\u6539\u884c\u3055\u308c\u3001\u300c\u3042\u3044\u3046\u3048\u304a\u300d\u3068\u300c\u304b\u304d\u304f\u3051\u3053\u300d\u304c\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>System.out.println(\"\u3042\u3044\u3046\u3048\u304a\");\r\nSystem.out.println(\"\u304b\u304d\u304f\u3051\u3053\");<\/code><\/pre>\n<p>\u6539\u884c\u3092\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u3001\u300cln\uff08\u30a8\u30eb\u30fb\u30a8\u30cc\uff09\u300d\u3092\u4ed8\u3051\u305a\u3001\u300cprint\u300d\u3068\u8a18\u8ff0\u3057\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u300c\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3053\u300d\u3068\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>System.out.print(\"\u3042\u3044\u3046\u3048\u304a\");\r\nSystem.out.print(\"\u304b\u304d\u304f\u3051\u3053\");<\/code><\/pre>\n<p>\u6570\u5b57\u3084\u3001\u3053\u308c\u304b\u3089\u5b66\u7fd2\u3059\u308b\u5909\u6570\u306f\u3001\u300c&quot;&quot;\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u3067\u56f2\u307e\u305a\u8a18\u8ff0\u3059\u308b\u3068\u3001\u6570\u5b57\u3084\u5909\u6570\u306b\u4ee3\u5165\u3055\u308c\u305f\u5024\u304c\u305d\u306e\u307e\u307e\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u5186\u30de\u30fc\u30af\u3084\u6539\u884c\u306a\u3069\u306e\u4e00\u90e8\u306e\u7279\u6b8a\u306a\u6587\u5b57\u306f\u3001\u305d\u306e\u307e\u307e\u8a18\u8ff0\u3057\u3066\u3082\u51fa\u529b\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\nJava\u3067\u306f\u3053\u308c\u3089\u306e\u7279\u6b8a\u306a\u6587\u5b57\u3092\u8868\u793a\u3059\u308b\u5834\u5408\u3001\u6b21\u306e\u3088\u3046\u306a\u300c\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u300d\u3092\u4f7f\u3044\u307e\u3059\u3002<br \/>\n\u300c\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u300d\u3068\u306f\u3001\u305d\u306e\u307e\u307e\u3067\u306f\u8868\u793a\u3067\u304d\u306a\u3044\u7279\u6b8a\u306a\u6587\u5b57\u3092\u753b\u9762\u306b\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u5236\u5fa1\u6587\u5b57\u3067\u3059\u3002<\/p>\n<pre\r\n\tclass=\"Copy prettyprint lang-js\"><code>System.out.println(\"\u3042\" + \"\\t\" + \"\u3044\"); \/\/ \u300c\u3042\u300d\u3068\u300c\u3044\u300d\u306e\u9593\u306b\u30bf\u30d6\u30b9\u30da\u30fc\u30b9\u3092\u633f\u5165\u3059\u308b\u5834\u5408<\/code><\/pre>\n<p>Java\u3067\u4f7f\u7528\u3067\u304d\u308b\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<caption class=\"title\">\u8868 1. Java\u306e\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u306e\u4f8b<\/caption>\n<colgroup>\n<col>\n<col>\n<col>\n\t<\/colgroup>\n<thead>\n<tr>\n<th>\u8a18\u8ff0<\/th>\n<th>\u540d\u79f0<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n\t\t\t\t\\t\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6c34\u5e73\u30bf\u30d6\n\t\t\t<\/td>\n<td>\n\t\t\t\tTab\uff08\u30bf\u30d6\uff09\u30b9\u30da\u30fc\u30b9\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\\n\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6539\u884c\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6539\u884c\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\\&quot;\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\\&apos;\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\\\\\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u5186\u30de\u30fc\u30af\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u5186\u30de\u30fc\u30af\n\t\t\t<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u306a\u304a\u3001\u300c\\\uff08\u5186\u30de\u30fc\u30af\uff09\u300d\u306f\u3001\u534a\u89d2\u5165\u529b\u3067\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u300c\\\u300d\u3092\u62bc\u4e0b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"Information-block\">\n<div class=\"Information-heading\">\n<div class=\"Google-icon Google-icon--information\"><\/div>\n<div class=\"Information-heading__child\">Information<\/div>\n<\/p><\/div>\n<p>\t\u6587\u5b57\u30b3\u30fc\u30c9\u306e\u8a2d\u5b9a\u306b\u3088\u3063\u3066\u306f\u3001\u5186\u30de\u30fc\u30af\u304c\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u3067\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u540c\u7fa9\u3068\u3057\u3066\u6349\u3048\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\t\u306a\u304a\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3068\u306f\u3001\u5404\u6587\u5b57\u306b\u5bfe\u5fdc\u4ed8\u3051\u3089\u308c\u305f\u56fa\u6709\u306e\u756a\u53f7\u306e\u3053\u3068\u3067\u3059\u3002<br \/>\n\t\u69d8\u3005\u306a\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4e3b\u306b\u300cUTF-8\u300d\u3092\u4f7f\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u3061\u3089\u3092\u899a\u3048\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002\n<\/p><\/div>\n<div class=\"Separator\">\n<div class=\"Separator__child\"><\/div>\n<\/div>\n<h3 class=\"Heading Title Title--m\" id=\"Bookmark-5\"><span class=\"Num\">5.<\/span>\u30c7\u30fc\u30bf\u578b\u3001\u5909\u6570\u3001\u5b9a\u6570\u3001\u578b\u5909\u63db<\/h3>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u6570\u5b57\u3084\u6587\u5b57\u306a\u3069\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\u306f\u3001\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u3068\u304d\u306b\u5fc5\u8981\u306a\u5909\u6570\u3084\u30c7\u30fc\u30bf\u578b\u306a\u3069\u306e\u6271\u3044\u65b9\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\u7d39\u4ecb\u3059\u308b\u6587\u6cd5\u306f\u3001Java\u8a00\u8a9e\u3060\u3051\u3067\u306a\u304f\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u5171\u901a\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-5-1\"><span class=\"Num\">5.1.<\/span>\u5909\u6570<\/h4>\n<p>\u5909\u6570\u3068\u306f\u3001\u30c7\u30fc\u30bf\u3092\u5165\u308c\u3066\u304a\u304f\u305f\u3081\u306e\u5165\u308c\u7269\u3067\u3059\u3002<\/p>\n<p>\u6570\u5b57\u3084\u6587\u5b57\u306a\u3069\u304c\u30c7\u30fc\u30bf\u3068\u306a\u308a\u307e\u3059\u304c\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u51e6\u7406\u3059\u308b\u3068\u304d\u306b\u3001\u3053\u308c\u3089\u306e\u30c7\u30fc\u30bf\u3092\u4e00\u6642\u7684\u306b\u30e1\u30e2\u30ea\u306b\u8a18\u61b6\u3055\u305b\u3066\u51e6\u7406\u3092\u3057\u307e\u3059\u3002<br \/>\n\u305d\u306e\u6642\u3001\u305d\u306e\u30e1\u30e2\u30ea\u9818\u57df\u306b\u540d\u524d\u3092\u3064\u3051\u3066\u30c7\u30fc\u30bf\u3092\u8a18\u61b6\u3055\u305b\u307e\u3059\u3002\u3053\u306e\u30e1\u30e2\u30ea\u9818\u57df\u306b\u56fa\u6709\u306e\u540d\u524d\u3092\u4ed8\u3051\u305f\u3082\u306e\u306e\u3053\u3068\u3092\u3001\u5909\u6570\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n<p>\u6570\u5b66\u3067\u8a00\u3046\u3068\u3001x\u3084y\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002\u5909\u6570\u306b\u683c\u7d0d\u3057\u305f\u30c7\u30fc\u30bf\u306f\u3001\u5fc5\u8981\u306a\u6642\u306b\u53d6\u308a\u51fa\u3057\u3066\u5229\u7528\u3057\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u51e6\u7406\u306e\u9014\u4e2d\u3067\u9055\u3046\u30c7\u30fc\u30bf\u3092\u5165\u308c\u306a\u304a\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/hensu.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/hensu.png\" alt=\"hensu\"><br \/>\n<\/a><\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u8a18\u8ff0\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>x = 10; \/\/ \u5909\u6570x\u306b10\u3092\u5165\u308c\u307e\u3059\r\nx = 20; \/\/ \u5909\u6570x\u306b20\u3092\u5165\u308c\u306a\u304a\u3057\u307e\u3059\r\nx = 10 * 20; \/\/ \u5909\u6570x\u306b10\u00d720\u306e\u7d50\u679c\u3001200\u3092\u5165\u308c\u306a\u304a\u3057\u307e\u3059<\/code><\/pre>\n<p>\u6570\u5b66\u3068\u306f\u7570\u306a\u308a\u3001\u5909\u6570\u306b\u306f\u6570\u5b57\u3060\u3051\u3067\u306a\u304f\u6587\u5b57\u30c7\u30fc\u30bf\u3082\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u6587\u5b57\u30c7\u30fc\u30bf\u3092\u5165\u308c\u308b\u3068\u304d\u306f\u3001\u300c&quot;&quot;\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u3067\u30c7\u30fc\u30bf\u3092\u56f2\u307f\u307e\u3059\u3002<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u8a18\u8ff0\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>y = \"\u304a\u306f\u3088\u3046\"; \/\/ \u5909\u6570y\u306b\u300c\u304a\u306f\u3088\u3046\u300d\u3092\u5165\u308c\u307e\u3059\r\ny = \"\u3053\u3093\u306b\u3061\u306f\"; \/\/ \u5909\u6570y\u306b\u300c\u3053\u3093\u306b\u3061\u306f\u300d\u3092\u5165\u308c\u306a\u304a\u3057\u307e\u3059\r\ny = \"\u3053\u3093\u3070\u3093\u306f\"; \/\/ \u5909\u6570y\u306b\u300c\u3053\u3093\u3070\u3093\u306f\u300d\u3092\u5165\u308c\u306a\u304a\u3057\u307e\u3059<\/code><\/pre>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-5-2\"><span class=\"Num\">5.2.<\/span>\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3055\u3066\u3001\u6b21\u306f\u3001\u30c7\u30fc\u30bf\u578b\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>\u5909\u6570\u3092\u4f7f\u3046\u3068\u304d\u306b\u306f\u3001\u304a\u7d04\u675f\u3068\u3057\u3066<span class=\"Text-highlight\">\u5909\u6570\u306e\u5ba3\u8a00<\/span>\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u524d\u306b\u8aac\u660e\u3057\u305f\u3068\u304a\u308a\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306f\u3001\u66d6\u6627\u306a\u547d\u4ee4\u3067\u306f\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3066\u304f\u308c\u307e\u305b\u3093\u3002<br \/>\n\u5909\u6570\u3092\u4f7f\u3046\u3068\u304d\u3082\u3001\u4f7f\u3046\u524d\u306b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306b\u300c\u81ea\u5206\u306f\u3001x\u3068\u3044\u3046\u540d\u524d\u306e\u5909\u6570\u3092\u3053\u3046\u3044\u3046\u30c7\u30fc\u30bf\u306e\u7a2e\u985e\u3067\u4f7f\u3044\u307e\u3059\u304b\u3089\u3001\u30e1\u30e2\u30ea\u30fc\u3092\u7528\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u300d\u3068\u5ba3\u8a00\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3092<span class=\"Text-highlight\">\u5909\u6570\u306e\u5ba3\u8a00<\/span>\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n<p><span class=\"Text-highlight\">\u30c7\u30fc\u30bf\u578b<\/span>\u306f\u3001\u30c7\u30fc\u30bf\u306e\u7a2e\u985e\u306e\u3053\u3068\u3067\u3059\u3002<br \/>\n\u300c\u6587\u5b57\u300d\u3068\u300c\u6570\u5b57\u300d\u306a\u3069\u306e\u3088\u3046\u306b\u3001\u30c7\u30fc\u30bf\u306e\u7a2e\u985e\u306b\u3088\u3063\u3066\u7528\u610f\u3059\u308b\u5909\u6570\u306e\u5f62\u5f0f\uff08\u5165\u308c\u7269\u306e\u5f62\uff09\u304c\u7570\u306a\u308a\u307e\u3059\u3002<br \/>\n\u5909\u6570\u3092\u6271\u3046\u3068\u304d\u306b\u306f\u3001\u9069\u5207\u306a<span class=\"Text-highlight\">\u30c7\u30fc\u30bf\u578b<\/span>\u3067\u5ba3\u8a00\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u5909\u6570\u306b\u306f\u5fc5\u305a\u300c\u5909\u6570\u540d\u300d\u3092\u3064\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><span class=\"Text-highlight\">\u5909\u6570\u306e\u5ba3\u8a00<\/span>\u306e\u66f8\u5f0f\u306f\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\u30c7\u30fc\u30bf\u578b \u5909\u6570\u540d;<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u5909\u6570\u306e\u8aac\u660e\u3067\u4f7f\u7528\u3057\u305fx\u3068y\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5ba3\u8a00\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>int x; \/\/ int\u306f\u3001\u6574\u6570\u306e\u30c7\u30fc\u30bf\u578b\u3067\u3059\r\nString y; \/\/ String\u306f\u3001\u6587\u5b57\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3067\u3059<\/code><\/pre>\n<p>Java\u306e\u30c7\u30fc\u30bf\u578b\u306f\u5927\u5225\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u300c\u57fa\u672c\u30c7\u30fc\u30bf\u578b\uff08\u30d7\u30ea\u30df\u30c6\u30a3\u30d6\u578b\uff09\u300d\u3068\u300c\u53c2\u7167\u578b\uff08\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u578b\uff09\u300d\u306b\u5206\u3051\u3089\u308c\u307e\u3059\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/datatype.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/datatype.png\" alt=\"datatype\"><br \/>\n<\/a><\/p>\n<p>\u300c\u57fa\u672c\u30c7\u30fc\u30bf\u578b\uff08\u30d7\u30ea\u30df\u30c6\u30a3\u30d6\u578b\uff09\u300d\u306f8\u7a2e\u985e\u306e\u307f\u3067\u65b0\u305f\u306b\u4f5c\u6210\u3059\u308b\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n\u300c\u57fa\u672c\u30c7\u30fc\u30bf\u578b\uff08\u30d7\u30ea\u30df\u30c6\u30a3\u30d6\u578b\uff09\u300d\u306f\u3001\u5927\u304d\u304f\u5206\u3051\u308b\u3068\u6587\u5b57\u578b\u3068\u6570\u5024\u578b\u3001boolean\u578b\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u6570\u5024\u578b\u306e\u5834\u5408\u3001\u578b\u306b\u5927\u304d\u3055\u304c\u3042\u308a\u3001\u5165\u308c\u308b\u5024\u306e\u5927\u304d\u3055\u306b\u3088\u3063\u3066\u4f7f\u3044\u5206\u3051\u3092\u3057\u307e\u3059\u3002<br \/>\n\u5c0f\u3055\u3044\u578b\u306b\u5927\u304d\u306a\u6570\u5b57\u3092\u5165\u308c\u308b\u3068\u3001\u5185\u90e8\u7684\u306b\u6841\u3042\u3075\u308c\u304c\u767a\u751f\u3057\u3001\u304a\u304b\u3057\u306a\u6570\u5b57\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u5fc5\u8981\u3082\u306a\u3044\u306e\u306b\u5927\u304d\u3044\u30c7\u30fc\u30bf\u578b\u3092\u4f7f\u3046\u3053\u3068\u306f\u3001\u30e1\u30e2\u30ea\u30fc\u306e\u7121\u99c4\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u57fa\u672c\u30c7\u30fc\u30bf\u578b\u306b\u306f\u542b\u307e\u308c\u307e\u305b\u3093\u304c\u3001\u4e0a\u8a18\u3067\u8aac\u660e\u3057\u305fString\u578b\u306f\u6587\u5b57\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3068\u306a\u308a\u3001\u6587\u5b57\u5217\u3092\u6271\u3046\u3068\u304d\u306b\u306f\u6700\u3082\u3088\u304f\u4f7f\u3046\u30c7\u30fc\u30bf\u578b\u3067\u3059\u3002<br \/>\nString\u578b\u306f\u3001\u53c2\u7167\u578b\u306e\u30af\u30e9\u30b9\u578b\u5909\u6570\u306b\u5206\u985e\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>boolean\u578b\u306f\u7279\u6b8a\u306a\u578b\u3067\u3001true\u304bfalse\u306e\u3069\u3061\u3089\u304b\u306e\u5024\u304c\u5165\u308a\u307e\u3059\u3002<br \/>\ntrue\u306f\u300c\u771f\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3001\u4f55\u304b\u306e\u6761\u4ef6\u306b\u5408\u3063\u3066\u3044\u308b\u5834\u5408\u3092\u793a\u3057\u3001false\u306f\u300c\u507d\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3001\u6761\u4ef6\u306b\u5408\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u300c\u53c2\u7167\u578b\uff08\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u578b\uff09\u300d\u3068\u306f\u30af\u30e9\u30b9\u3001\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3001\u914d\u5217\u306e\u4e8b\u3067\u3001\u3053\u308c\u3089\u306f\u5f8c\u306e\u7ae0\u3067\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u304c\u57fa\u672c\u30c7\u30fc\u30bf\u578b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<caption class=\"title\">\u8868 2. \u57fa\u672c\u30c7\u30fc\u30bf\u578b\u4e00\u89a7<\/caption>\n<colgroup>\n<col>\n<col>\n<col>\n\t<\/colgroup>\n<thead>\n<tr>\n<th>\u30c7\u30fc\u30bf\u578b\u306e\u5206\u985e<\/th>\n<th>\u30c7\u30fc\u30bf\u578b<\/th>\n<th>\u8a18\u61b6\u3067\u304d\u308b\u30c7\u30fc\u30bf\u306e\u7a2e\u985e\u3068\u5024\u306e\u7bc4\u56f2<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n\t\t\t\t\u6570\u5024\u578b\n\t\t\t<\/td>\n<td>\n\t\t\t\tbyte\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6574\u6570\uff081\u30d0\u30a4\u30c8\u3001-128\u304b\u3089127\uff09\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\u6570\u5024\u578b\n\t\t\t<\/td>\n<td>\n\t\t\t\tshort\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6574\u6570\uff082\u30d0\u30a4\u30c8\u3001-32768\u304b\u308932767\uff09\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\u6570\u5024\u578b\n\t\t\t<\/td>\n<td>\n\t\t\t\tint\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6574\u6570\uff084\u30d0\u30a4\u30c8\u3001-2147483648\u304b\u30892147483647\uff09\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\u6570\u5024\u578b\n\t\t\t<\/td>\n<td>\n\t\t\t\tlong\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6574\u6570\uff088\u30d0\u30a4\u30c8\u3001-9223372036854775808\u304b\u30899223372036854775807\uff09\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\u6570\u5024\u578b\n\t\t\t<\/td>\n<td>\n\t\t\t\tfloat\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u5c0f\u6570\uff084\u30d0\u30a4\u30c8\u5358\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\uff09\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\u6570\u5024\u578b\n\t\t\t<\/td>\n<td>\n\t\t\t\tdouble\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u5c0f\u6570\uff088\u30d0\u30a4\u30c8\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\uff09\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\u6587\u5b57\u578b\n\t\t\t<\/td>\n<td>\n\t\t\t\tchar\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6587\u5b57\uff082\u30d0\u30a4\u30c8\u30011\u6587\u5b57\u306e\u307f\uff09\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\tboolean\u578b\n\t\t\t<\/td>\n<td>\n\t\t\t\tboolean\n\t\t\t<\/td>\n<td>\n\t\t\t\ttrue\uff08\u771f\uff09\u304bfalse\uff08\u507d\uff09\n\t\t\t<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"Information-block\">\n<div class=\"Information-heading\">\n<div class=\"Google-icon Google-icon--information\"><\/div>\n<div class=\"Information-heading__child\">Information<\/div>\n<\/p><\/div>\n<div class=\"Heading Title Title--xs\">\u5909\u6570\u540d\u306e\u30eb\u30fc\u30eb<\/div>\n<p>\t\u5909\u6570\u3092\u4f7f\u3046\u3068\u304d\u306b\u306f\u5fc5\u305a\u300c\u5909\u6570\u540d\u300d\u3092\u3064\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u57fa\u672c\u7684\u306b\u306f\u81ea\u7531\u306b\u305d\u306e\u540d\u524d\u3092\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\t\u305f\u3060\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5236\u9650\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul class=\"Base-list\">\n<li class=\"Base-list__child\">\u6570\u5b57\u3067\u59cb\u3081\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/li>\n<li class=\"Base-list__child\">Java\u3067\u4f7f\u3063\u3066\u3044\u308b\u30ad\u30fc\u30ef\u30fc\u30c9\uff08\u4e88\u7d04\u8a9e\u3068\u8a00\u3044\u307e\u3059\uff09\u306f\u3001\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\uff08class\u3001&#43;\u3001\/\u306a\u3069\uff09 <\/li>\n<\/ul>\n<p>\t\u5909\u6570\u540d\u306f\u3001\u3069\u3093\u306a\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u308b\u304b\u3001\u63a8\u6e2c\u3057\u3084\u3059\u3044\u540d\u524d\u3092\u3064\u3051\u305f\u65b9\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u3002\u307e\u305f\u3001Java\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6697\u9ed9\u306e\u30eb\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"Base-list\">\n<li class=\"Base-list__child\">\u4e00\u3064\u306e\u5909\u6570\u540d\u3067\u8907\u6570\u306e\u5358\u8a9e\u3092\u304f\u3063\u3064\u3051\u3066\u547d\u540d\u3059\u308b\u3068\u304d\u306f\u3001\u4e8c\u3064\u76ee\u4ee5\u964d\u306e\u5358\u8a9e\u306e\u4e00\u6587\u5b57\u76ee\u306f\u5927\u6587\u5b57\u306b\u3057\u307e\u3059\u3002<\/li>\n<li class=\"Base-list__child\">\u5909\u6570\u540d\u3068\u30e1\u30bd\u30c3\u30c9\u540d\u306f\u5c0f\u6587\u5b57\u304b\u3089\u59cb\u3081\u307e\u3059\u3002<\/li>\n<li class=\"Base-list__child\">\u30af\u30e9\u30b9\u540d\u306f\u3001\u5927\u6587\u5b57\u304b\u3089\u59cb\u3081\u307e\u3059\u3002<\/li>\n<li class=\"Base-list__child\">\u5b9a\u6570\u306f\u3001\u5168\u3066\u5927\u6587\u5b57\u3067\u3001\u5358\u8a9e\u3068\u5358\u8a9e\u306f\u3001\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc\u3067\u304f\u3063\u3064\u3051\u307e\u3059\u3002<\/li>\n<li class=\"Base-list__child\">\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306f\u3001\u5168\u3066\u5c0f\u6587\u5b57\u3067\u8868\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\t\u3053\u308c\u3089\u306f\u5b88\u3089\u306a\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001Java\u306e\u4e16\u754c\u3067\u306f\u901a\u4f8b\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\t\u307e\u305f\u3001\u5b9f\u969b\u306e\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3067\u306f\u547d\u540d\u898f\u7d04\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u304c\u3042\u308a\u3001\u5909\u6570\u540d\u306a\u3069\u306e\u547d\u540d\u306e\u30eb\u30fc\u30eb\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\t\u305d\u3046\u3044\u3063\u305f\u5834\u5408\u306b\u306f\u3001\u547d\u540d\u898f\u7d04\u3092\u9075\u5b88\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n<\/p><\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-5-3\"><span class=\"Num\">5.3.<\/span>\u4ee3\u5165<\/h4>\n<p>\u5909\u6570\u306b\u30c7\u30fc\u30bf\uff08\u5024\uff09\u3092\u5165\u308c\u308b\u3053\u3068\u3092\u4ee3\u5165\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/dainyu.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/dainyu.png\" alt=\"dainyu\"><br \/>\n<\/a><\/p>\n<p>\u4ee3\u5165\u306b\u306f\u3001\u300c=\uff08\u30a4\u30b3\u30fc\u30eb\uff1a\u534a\u89d2\uff09\u300d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u300c=\u300d\u306e\u5de6\u5074\u306b\u4ee3\u5165\u3057\u305f\u3044\u5909\u6570\u540d\u3092\u66f8\u304d\u3001\u53f3\u5074\u306b\u4ee3\u5165\u3057\u305f\u3044\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u307e\u3059\u3002<br \/>\n\u4ee3\u5165\u306e\u66f8\u5f0f\u306f\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\u5909\u6570\u540d = \u30c7\u30fc\u30bf\uff08\u5024\uff09;<\/code><\/pre>\n<p>\u5909\u6570\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30c7\u30fc\u30bf\u578b\u306e\u9805\u3067\u5b66\u7fd2\u3057\u305f\u3088\u3046\u306b\u3001\u5909\u6570\u306e\u5ba3\u8a00\u3092\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u5b9f\u969b\u306b\u5909\u6570\u3092\u5ba3\u8a00\u3057\u3001\u305d\u306e\u5909\u6570\u306b\u30c7\u30fc\u30bf\uff08\u5024\uff09\u3092\u4ee3\u5165\u3057\u305f\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/dainyu2.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/dainyu2.png\" alt=\"dainyu2\"><br \/>\n<\/a><\/p>\n<p>\u4ee3\u5165\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u66f8\u304f\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u6587\u5b57\u5217\u306e\u5834\u5408\u3001\u300c&quot;&quot;\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u3067\u6587\u5b57\u5217\u3092\u56f2\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u307e\u305f\u30011\u6587\u5b57\u306e\u5834\u5408\u3001\u300c&apos;&apos;\uff08\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u3067\u6587\u5b57\u3092\u56f2\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Hensu1.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Hensu1 { \/\/ \u30af\u30e9\u30b9\u306e\u5ba3\u8a00\uff08\u5f8c\u3067\u5b66\u7fd2\u3057\u307e\u3059\uff09\r\n\tpublic static void main(String[] args) { \/\/ \u30e1\u30a4\u30f3\u30e1\u30bd\u30c3\u30c9\uff08\u5f8c\u3067\u5b66\u7fd2\u3057\u307e\u3059\uff09\r\n\t\tint x; \/\/ \u5909\u6570x\u306e\u5ba3\u8a00\r\n\t\tString y; \/\/ \u5909\u6570y\u306e\u5ba3\u8a00\r\n\t\tchar z; \/\/ \u5909\u6570z\u306e\u5ba3\u8a00\r\n\r\n\t\tx = 10; \/\/ x\u306b10\u3092\u4ee3\u5165\r\n\t\ty = \"\u3053\u3093\u306b\u3061\u306f\"; \/\/ y\u306b\u6587\u5b57\u5217\u300c\u3053\u3093\u306b\u3061\u306f\u300d\u3092\u4ee3\u5165(\u300c\"\"\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3)\u300d\u4f7f\u7528\uff09\r\n\t\tz = '\u3042'; \/\/ z\u306b\u6587\u5b57\u300c\u3042\u300d\u3092\u4ee3\u5165\u300c''\uff08\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3)\u300d\u4f7f\u7528\uff09\r\n\t}\r\n}<\/code><\/pre>\n<p>\u5909\u6570\u306e\u5ba3\u8a00\u3068\u540c\u6642\u306b\u3001\u5909\u6570\u306b\u5024\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Hensu2.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Hensu2 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 10; \/\/ \u5909\u6570x\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\r\n\t\tString y = \"\u3053\u3093\u306b\u3061\u306f\"; \/\/ \u5909\u6570y\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\r\n\t\tchar z = '\u3042'; \/\/ \u5909\u6570z\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\r\n\t}\r\n}<\/code><\/pre>\n<p>\u4ee3\u5165\u3067\u306f\u3001\u5909\u6570\u306b\u30c7\u30fc\u30bf\uff08\u5024\uff09\u305d\u306e\u3082\u306e\u3067\u306f\u306a\u304f\u4ed6\u306e\u5909\u6570\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Hensu3.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Hensu3 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 10; \/\/ \u5909\u6570x\u306e\u5ba3\u8a00\u306810\u3092\u4ee3\u5165\r\n\t\tint z = x; \/\/ \u5909\u6570z\u306e\u5ba3\u8a00\u3068x\u306e\u5024\uff0810\uff09\u3092\u4ee3\u5165\r\n\t}\r\n}<\/code><\/pre>\n<p>\u5909\u6570\u306b\u306f\u3001\u30c7\u30fc\u30bf\uff08\u5024\uff09\u3092\u4ee3\u5165\u3059\u308b\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u8a08\u7b97\u7d50\u679c\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u5024\u3092\u51fa\u529b\u3059\u308b\u305f\u3081\u306b\u3001\u5909\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002\u5909\u6570\u306e\u8a08\u7b97\u306b\u3064\u3044\u3066\u306f\u3001\u5f8c\u3067\u8a73\u3057\u304f\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Hensu4.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Hensu4 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 10; \/\/ \u5909\u6570x\u306e\u5ba3\u8a00\u306810\u3092\u4ee3\u5165\r\n\t\tSystem.out.println(x); \/\/ x\u306e\u5024\uff0810\uff09\u3092\u51fa\u529b\r\n\r\n\t\tint z = x + 2; \/\/ \u5909\u6570z\u306e\u5ba3\u8a00\u3068x\u306e\u5024\uff0810\uff09\u306b2\u3092\u52a0\u7b97\u3057\u305f12\u3092\u4ee3\u5165\r\n\t\tSystem.out.println(z); \/\/ z\u306e\u5024\uff0812\uff09\u3092\u51fa\u529b\r\n\t}\r\n}<\/code><\/pre>\n<p>\u4ee3\u5165\u3067\u306f\u3001\u30c7\u30fc\u30bf\uff08\u5024\uff09\u306e\u7a2e\u985e\uff08\u6587\u5b57\u3084\u6574\u6570\u3001\u5c0f\u6570\u306a\u3069\uff09\u304c\u3001\u5ba3\u8a00\u3057\u305f\u30c7\u30fc\u30bf\u578b\u3068\u5408\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/dainyu3.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/dainyu3.png\" alt=\"dainyu3\"><br \/>\n<\/a><\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ \u6587\u5b57\u30c7\u30fc\u30bf\u306f int \u578b\u306b\u4ee3\u5165\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u30a8\u30e9\u30fc\r\nint a = \"\u3053\u3093\u306b\u3061\u306f\";<\/code><\/pre>\n<p>\u307e\u305f\u3001\u4ee3\u5165\u3059\u308b\u30c7\u30fc\u30bf\uff08\u5024\uff09\u306e\u30b5\u30a4\u30ba\u304c\u5ba3\u8a00\u3057\u305f\u30c7\u30fc\u30bf\u578b\u306e\u30b5\u30a4\u30ba\u3088\u308a\u3082\u5927\u304d\u304b\u3063\u305f\u5834\u5408\u3001\u6841\u3042\u3075\u308c\u304c\u304a\u304d\u307e\u3059\u306e\u3067\u3001\u6c17\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4ee3\u5165\u6642\u306f\u3001\u578b\u306e\u7bc4\u56f2\u306b\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/dainyu4.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/dainyu4.png\" alt=\"dainyu4\"><br \/>\n<\/a><\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ \u5909\u6570a\u306fint\u578b\u3067\u3042\u308a\u3001\r\n\/\/ 2147483648\u3068\u3044\u3046\u6570\u5024\u306fint\u578b\u306e\u7bc4\u56f2\u3088\u308a\u5927\u304d\u3044\u6570\u5b57\u3067\u3042\u308b\u305f\u3081\u3001\u30a8\u30e9\u30fc\r\nint a = 2147483648;<\/code><\/pre>\n<p>\u307e\u305f\u3001long\u578b\u306e\u5909\u6570\u306bint\u578b\u306e\u7bc4\u56f2\u3088\u308a\u3082\u5927\u304d\u3044\u6570\u5b57\u3092\u4ee3\u5165\u3059\u308b\u3068\u304d\u306b\u306f\u3001\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\nint\u578b\u306e\u7bc4\u56f2\u3088\u308a\u5927\u304d\u3044\u6574\u6570\uff08\u6574\u6570\u30ea\u30c6\u30e9\u30eb\u53c8\u306f\u5358\u306b\u30ea\u30c6\u30e9\u30eb\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u3001long\u578b\u306e\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u5024\u3068\u3057\u3066\u305d\u306e\u307e\u307e\u8a18\u8ff0\u3057\u305f\u5834\u5408\u3001\u3053\u306e\u3088\u3046\u306a\u6574\u6570\u306f\u5168\u3066int\u578b\u3068\u3057\u3066\u5224\u65ad\u3055\u308c\u3066\u3057\u307e\u3044\u3001\u305f\u3068\u3048long\u578b\u306e\u5909\u6570\u306b\u4ee3\u5165\u3057\u3066\u3044\u305f\u3068\u3057\u3066\u3082\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30012147483648\u3068\u3044\u3046\u6570\u5b57\u306f\u3001int\u578b\u306e\u7bc4\u56f2\u3092\u8d8a\u3048\u308b\u305f\u3081\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ \u5909\u6570a\u306flong\u578b\u3067\u3042\u308b\u305f\u3081\u3001\u578b\u306e\u5927\u304d\u3055\u3068\u3057\u3066\u306f\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c\u3001\r\n\/\/ 2147483648\u3068\u3044\u3046\u6570\u5024\u305d\u306e\u3082\u306e\u304cint\u578b\u306e\u7bc4\u56f2\u3088\u308a\u5927\u304d\u3044\u6570\u5b57\u3067\u3042\u308b\u305f\u3081\u3001\u30a8\u30e9\u30fc\r\nlong a = 2147483648;<\/code><\/pre>\n<p>\u305d\u306e\u305f\u3081\u3001long\u578b\u306e\u5909\u6570\u306bint\u578b\u306e\u7bc4\u56f2\u3088\u308a\u5927\u304d\u3044\u6574\u6570\u3092\u4ee3\u5165\u3059\u308b\u3068\u304d\u306b\u306f\u3001\u4ee3\u5165\u3059\u308b\u6570\u5b57\u306e\u6700\u5f8c\u306b\u300cL\uff08\u30a8\u30eb\uff1a\u5927\u6587\u5b57\uff09\u300d\u307e\u305f\u306f\u3001\u300cl\uff08\u30a8\u30eb\uff1a\u5c0f\u6587\u5b57\uff09\u300d\u3092\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u300cL\u300d\u53c8\u306f\u300cl\u300d\u3092\u6570\u5b57\u306e\u6700\u5f8c\u306b\u8a18\u8ff0\u3059\u308b\u3068\u3001\u305d\u306e\u6574\u6570\u306flong\u578b\u3068\u306a\u308a\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ \u6570\u5024\u306e\u5f8c\u308d\u306bL\u3092\u4ed8\u3051\u308b\u3068\u3001\u305d\u306e\u6570\u5024\u306flong\u578b\u3068\u306a\u308a\u3001\u30a8\u30e9\u30fc\u306a\u304f\u4ee3\u5165\u3067\u304d\u307e\u3059\r\nlong a = 2147483648L;<\/code><\/pre>\n<p>\u5c0f\u6570\u70b9\u3092\u542b\u3080\u6570\u5024\u306f\u3001\u305d\u306e\u307e\u307e\u8a18\u8ff0\u3059\u308b\u3068\u3001double\u578b\u306b\u306a\u308a\u307e\u3059\u3002float\u578b\u3067\u8868\u73fe\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u6570\u5b57\u306e\u5f8c\u308d\u306b\u300cF\u300d\u304b\u300cf\u300d\u3092\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>float b = 3.14F; \/\/ 3.14\u306f\u3001float\u578b\u3068\u306a\u308a\u307e\u3059<\/code><\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u6574\u6570\u306e\u5834\u5408\u306fint\u578b\u3001\u5c0f\u6570\u306e\u5834\u5408\u306fdouble\u578b\u304c\u57fa\u672c\u306e\u578b\u3068\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u300cL\u300d\u3001\u300cl\u300d\u3001\u300cF\u300d\u3001\u300c\uff46\u300d\u3068\u3044\u3063\u305f\u8a18\u8ff0\u306e\u3053\u3068\u3092\u300c\u30b5\u30d5\u30a3\u30af\u30b9\u300d\u3068\u8a00\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u8a18\u8ff0\u306f\u5fd8\u308c\u3084\u3059\u3044\u305f\u3081\u3001\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"Information-block\">\n<div class=\"Information-heading\">\n<div class=\"Google-icon Google-icon--information\"><\/div>\n<div class=\"Information-heading__child\">Information<\/div>\n<\/p><\/div>\n<div class=\"Heading Title Title--xs\">\u5909\u6570\u306e\u521d\u671f\u5316<\/div>\n<p>\t\u5909\u6570\u306f\u3001\u4f55\u3082\u30c7\u30fc\u30bf\uff08\u5024\uff09\u304c\u4ee3\u5165\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002\u5909\u6570\u306e\u5ba3\u8a00\u306e\u307f\u3067\u3001\u4ee3\u5165\u304c\u4e00\u5ea6\u3082\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u3001\u300c<span class=\"Text-highlight\">\u5909\u6570\u304c\u521d\u671f\u5316\u3055\u308c\u3066\u3044\u306a\u3044<\/span>\u300d\u3068\u8a00\u3044\u307e\u3059\u3002<br \/>\n\tJava\u3067\u306f\u3001\u5909\u6570\u306e\u5ba3\u8a00\u3092\u3057\u305f\u5f8c\u306f\u3001\u521d\u671f\u5024\u3092\u4ee3\u5165\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5909\u6570\u306b\u4f55\u3089\u304b\u306e\u5024\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u3092\u300c<span class=\"Text-highlight\">\u521d\u671f\u5316<\/span>\u300d\u3068\u8a00\u3044\u307e\u3059\u3002\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-5-4\"><span class=\"Num\">5.4.<\/span>\u5b9a\u6570<\/h4>\n<p>\u5909\u6570\u306e\u5ba3\u8a00\u306e\u524d\u306bfinal\u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u305d\u306e\u5909\u6570\u306f\u3001\u5b9a\u6570\u3068\u547c\u3070\u308c\u308b\u7279\u6b8a\u306a\u5909\u6570\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5909\u6570\u306b\u306f\u3001\u5ba3\u8a00\u3057\u305f\u578b\u306b\u5408\u3063\u305f\u30c7\u30fc\u30bf\u3067\u3042\u308c\u3070\u3001\u51e6\u7406\u306e\u4e2d\u3067\u4f55\u56de\u3067\u3082\u30c7\u30fc\u30bf\u3092\u4ee3\u5165\u3057\u76f4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u5b9a\u6570\u306e\u5834\u5408\u3001\u5b9a\u6570\u306b\u4e00\u5ea6\u4f55\u304b\u30c7\u30fc\u30bf\u3092\u4ee3\u5165\u3059\u308b\u3068\u305d\u308c\u304c\u56fa\u5b9a\u5024\u3068\u306a\u308a\u3001\u305d\u308c\u4ee5\u964d\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u51e6\u7406\u306e\u4e2d\u3067\u9055\u3046\u30c7\u30fc\u30bf\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n\u4f8b\u3048\u3070\u30011\u5e74365\u65e5\u306e365\u3084\u30d5\u30a1\u30a4\u30eb\u540d\u306a\u3069\u3001\u56fa\u5b9a\u5024\u3068\u3057\u3066\u6271\u3044\u3001\u5909\u66f4\u3055\u308c\u305f\u304f\u306a\u3044\u5024\u306f\u3001\u5b9a\u6570\u3067\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9a\u6570\u306e\u66f8\u5f0f\u306f\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>final \u30c7\u30fc\u30bf\u578b \u5909\u6570\u540d = \u30c7\u30fc\u30bf\uff08\u5024\uff09;<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u4f8b\u306e\u3088\u3046\u306b\u5b9a\u6570\u540d\u306f\u5168\u3066\u5927\u6587\u5b57\u3067\u5ba3\u8a00\u3059\u308b\u306e\u304c\u901a\u4f8b\u3067\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>final int HOUR = 24;\r\nfinal float PAI = 3.14F;<\/code><\/pre>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-5-5\"><span class=\"Num\">5.5.<\/span>\u578b\u5909\u63db\uff08\u30ad\u30e3\u30b9\u30c8\uff09<\/h4>\n<p>\u3053\u308c\u307e\u3067\u8aac\u660e\u3057\u3066\u304d\u305f\u3088\u3046\u306b\u3001\u5909\u6570\u306b\u306f\u30c7\u30fc\u30bf\u578b\u304c\u6307\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u57fa\u672c\u7684\u306b\u3001\u305d\u306e\u30c7\u30fc\u30bf\u578b\u3068\u7570\u306a\u308b\u30c7\u30fc\u30bf\u578b\u306e\u30c7\u30fc\u30bf\uff08\u5024\uff09\u306f\u3001\u305d\u306e\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001\u6587\u5b57\u5217\u306e\u6570\u5024\u578b\u5909\u6570\u3078\u306e\u4ee3\u5165\u3001\u307e\u305f\u306f\u305d\u306e\u9006\u3082\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3057\u3001\u6570\u5024\u578b\u306e\u5834\u5408\u3001\u30c7\u30fc\u30bf\u306e\u7bc4\u56f2\u306e\u5927\u304d\u3044\u578b\u306b\u5c0f\u3055\u3044\u578b\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u5c0f\u3055\u3044\u578b\u306e\u5909\u6570\u306b\u5927\u304d\u3044\u578b\u306e\u30c7\u30fc\u30bf\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n\u4f8b\u3048\u3070\u3001int\u578b\u306e\u5909\u6570\u306b\u4ee3\u5165\u3067\u304d\u308b\u6570\u5024\u306f\u3001long\u578b\u306e\u5909\u6570\u306b\u3082\u4ee3\u5165\u3067\u304d\u307e\u3059\u304c\u3001int\u578b\u306e\u5909\u6570\u306b\u4ee3\u5165\u3067\u304d\u308b\u6570\u5024\u3067\u3042\u3063\u3066\u3082\u3001short\u578b\u306e\u5909\u6570\u306b\u4ee3\u5165\u3067\u304d\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/cast1.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/cast1.png\" alt=\"cast1\"><br \/>\n<\/a><\/p>\n<p>\u4ee5\u4e0b\u306e\u4f8b\u306e\u3088\u3046\u306b\u3001\u7bc4\u56f2\u306e\u5c0f\u3055\u3044int\u578b\u306e\u30c7\u30fc\u30bf\u3092\u7bc4\u56f2\u306e\u5927\u304d\u3044float\u578b\u306b\u4ee3\u5165\u3059\u308b\u3068\u3001\u30a8\u30e9\u30fc\u306b\u306f\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ 100\u3092\u4ee3\u5165\u3057\u305fint\u578b\u306e\u5909\u6570\u3092float\u578bb\u306b\u4ee3\u5165\u3057\u3066\u3082\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u305b\u3093\r\nint a = 100;\r\nString y = \"\u3053\u3093\u306b\u3061\u306f\"; \/\/ \u5909\u6570y\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\r\nfloat b = a; \/\/ 100.0 \u3068\u3057\u3066\u4ee3\u5165\u3055\u308c\u307e\u3059<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001float\u578b\u306e\u30c7\u30fc\u30bf\u3092int\u578b\u306b\u4ee3\u5165\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ 3.14\u3092\u4ee3\u5165\u3057\u305ffloat\u578b\u306e\u5909\u6570b\u3092int\u578b\u306e\u5909\u6570a\u306b\u4ee3\u5165\u3059\u308b\u3068\u30a8\u30e9\u30fc\r\nfloat b = 3.14F;\r\nint a = b; \/\/ \u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059<\/code><\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u5927\u304d\u3044\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30c7\u30fc\u30bf\u3092\u3001\u305d\u308c\u3088\u308a\u5c0f\u3055\u3044\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u5834\u5408\u306f\u3001\u578b\u3092\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u578b\u5909\u63db\u306b\u3088\u3063\u3066\u3001\u4ee3\u5165\u3092\u5f37\u5236\u7684\u306b\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u578b\u5909\u63db\u3092<span class=\"Text-highlight\">\u30ad\u30e3\u30b9\u30c8<\/span>\u3068\u8a00\u3044\u307e\u3059\u3002<br \/>\n\u30ad\u30e3\u30b9\u30c8\u306f\u3001\u5909\u63db\u5148\u306e\u30c7\u30fc\u30bf\u578b\u3092\u62ec\u5f27\u3067\u56f2\u3093\u3067\u3001\u578b\u5909\u63db\u3055\u305b\u305f\u3044\u30c7\u30fc\u30bf\u306e\u524d\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001float\u578b\u306e\u30c7\u30fc\u30bf\u3092int\u578b\u3078\u4ee3\u5165\u3059\u308b\u3068\u304d\u306b\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092int\u578b\u3078\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u306a\u304f\u306a\u308a\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3001\u30ad\u30e3\u30b9\u30c8\u3092\u884c\u3046\u3053\u3068\u306b\u3088\u308a\u3001\u30c7\u30fc\u30bf\u306e\u7cbe\u5ea6\u304c\u843d\u3061\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001\u7279\u306b\u7cbe\u5ea6\u304c\u6c42\u3081\u3089\u308c\u308b\u8a08\u7b97\u306a\u3069\u3092\u884c\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5834\u5408\u3001\u5b89\u6613\u306b\u30ad\u30e3\u30b9\u30c8\u3092\u4f7f\u308f\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001float\u578b\u306e\u6570\u5024\u3067\u3042\u308b\u300c3.14\u300d\u306e\u5c0f\u6570\u70b9\u4ee5\u4e0b\u304c\u5207\u308a\u843d\u3068\u3055\u308c\u3066\u3001\u6574\u6570\u306e3\u306b\u5909\u63db\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ 3.14\u3092\u5f37\u5236\u7684\u306bint\u578b\u306b\u578b\u5909\u63db\uff08\u30ad\u30e3\u30b9\u30c8\uff09\r\nfloat b = 3.14F;\r\nint a = (int) b; \/\/ \u6574\u6570\u306e3\u3067\u4ee3\u5165\u3055\u308c\u307e\u3059<\/code><\/pre>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-5-6\"><span class=\"Num\">5.6.<\/span>\u578b\u63a8\u8ad6<\/h4>\n<p>\u3053\u3053\u307e\u3067\u306f\u3001\u300c\u5909\u6570\u3092\u6271\u3046\u3068\u304d\u306b\u306f\u3001\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u3067\u5ba3\u8a00\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u300d\u3068\u8aac\u660e\u3092\u3057\u3066\u304d\u307e\u3057\u305f\u304c\u3001Java 10\u3088\u308a\u3001\u578b\u3092\u6307\u5b9a\u3057\u306a\u304f\u3066\u3082\u3001\u81ea\u52d5\u3067\u5909\u6570\u306e\u30c7\u30fc\u30bf\u578b\u3092\u63a8\u5b9a\u3057\u3066\u304f\u308c\u308b\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u3053\u306e\u6a5f\u80fd\u306b\u3088\u308a\u3001\u5909\u6570\u306e\u5ba3\u8a00\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u884c\u3046\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>\/\/ int\u578b\u3068String\u578b\u306e\u5909\u6570\u3092\u300cvar\u300d\u3092\u7528\u3044\u3066\u5ba3\u8a00\u3057\u307e\u3059\u3002\r\nvar a = 100;\r\nvar b = \"\u3053\u3093\u306b\u3061\u306f\";<\/code><\/pre>\n<p>var\u306f\u3001variable\uff08\u5909\u6570\uff09\u306e\u3053\u3068\u3092\u8868\u3057\u3001int\u3084String\u306a\u3069\u306e\u30c7\u30fc\u30bf\u578b\u306e\u4ee3\u308f\u308a\u306b\u7528\u3044\u3066\u3001\u5909\u6570\u306e\u5ba3\u8a00\u3092\u3057\u307e\u3059\u3002<br \/>\n\u3053\u308c\u306b\u3088\u308a\u3001\u5909\u6570\u5ba3\u8a00\u306e\u7c21\u7565\u5316\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001var\u306f\u3059\u3079\u3066\u306e\u5909\u6570\u5ba3\u8a00\u3067\u7528\u3044\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u8a73\u7d30\u306a\u8aac\u660e\u306f\u7701\u7565\u3057\u307e\u3059\u304c\u3001\u4ee5\u4e0b\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"Base-list\">\n<li class=\"Base-list__child\">\u53f3\u8fba\u3092\u898b\u308c\u3070\u30c7\u30fc\u30bf\u578b\u304c\u660e\u767d\u3067\u3042\u308b\u5834\u5408<\/li>\n<li class=\"Base-list__child\">\u30e1\u30bd\u30c3\u30c9\u5185\u3067\u5ba3\u8a00\u3055\u308c\u3066\u3044\u308b\u5909\u6570\uff08\u30ed\u30fc\u30ab\u30eb\u5909\u6570\uff09\u3067\u3042\u308b\u5834\u5408<\/li>\n<\/ul>\n<p>\u307e\u305f\u3001\u30c7\u30fc\u30bf\u578b\u306e\u8a18\u8ff0\u3092var\u306b\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u5ba3\u8a00\u3055\u308c\u3066\u3044\u308b\u5909\u6570\u304c\u4f55\u578b\u306a\u306e\u304b\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u898b\u76f4\u3057\u305f\u6642\u306b\u308f\u304b\u308a\u3065\u3089\u3044\u3068\u3044\u3063\u305f\u30c7\u30e1\u30ea\u30c3\u30c8\u3082\u3042\u308a\u307e\u3059\u3002<br \/>\n<span class=\"Text-highlight\">\u7279\u5225\u306a\u7406\u7531\u304c\u306a\u3044\u9650\u308a\u3001var\u306f\u4f7f\u7528\u305b\u305a\u306b\u3001\u30c7\u30fc\u30bf\u578b\u3092\u8a18\u8ff0\u3057\u3066\u5909\u6570\u5ba3\u8a00\u3092\u884c\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/span><\/p>\n<div class=\"Separator\">\n<div class=\"Separator__child\"><\/div>\n<\/div>\n<h3 class=\"Heading Title Title--m\" id=\"Bookmark-6\"><span class=\"Num\">6.<\/span>\u7df4\u7fd2\u554f\u984c1<\/h3>\n<p>\u305d\u308c\u3067\u306f\u3001\u30c7\u30fc\u30bf\u578b\u3001\u5909\u6570\u3001\u5b9a\u6570\u3001\u30ad\u30e3\u30b9\u30c8\u306e\u7df4\u7fd2\u554f\u984c\u306b\u6311\u6226\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u305d\u308c\u305e\u308c\u306e\u554f\u984c\u3054\u3068\u306b\u3001\u65b0\u898f\u306b\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30af\u30e9\u30b9\u306e\u540d\u524d\u306f\u3001\u7279\u306b\u6307\u5b9a\u3057\u307e\u305b\u3093\u306e\u3067\u3001\u300cMondai1\u300d\u306a\u3069\u9069\u5f53\u306a\u540d\u524d\u3092\u4ed8\u3051\u3066\u3001\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-1\"><span class=\"Num\">6.1.<\/span>\u554f\u984c1<\/h4>\n<p>\u6574\u6570\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5909\u6570\u300cx\u300d\u3092\u5ba3\u8a00\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u305d\u306e\u3042\u3068\u3001\u5909\u6570\u300cx\u300d\u306b\u300c10\u300d\u3092\u4ee3\u5165\u3057\u3001\u5909\u6570\u300cx\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-1\"><label for=\"Answer-content-1\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai6_1.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a\u5909\u6570x\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_1 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ int\u578b\u5909\u6570x\u306e\u5ba3\u8a00\r\n\t\tint x;\r\n\r\n\t\t\/\/ \u5909\u6570x\u306b10\u3092\u4ee3\u5165\r\n\t\tx = 10;\r\n\r\n\t\t\/\/ \u5909\u6570x\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(x);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\t\u5909\u6570\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u307e\u305a\u6700\u521d\u306b\u5909\u6570\u306e\u5ba3\u8a00\u300c\u30c7\u30fc\u30bf\u578b \u5909\u6570\u540d\u300d\u306e\u8a18\u8ff0\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n\t\t\u6574\u6570\u3092\u683c\u7d0d\u3059\u308b\u5909\u6570\u306e\u5834\u5408\u3001\u6574\u6570\u306e\u30c7\u30fc\u30bf\u578b\u3092\u4f7f\u7528\u3057\u3066\u5909\u6570\u306e\u5ba3\u8a00\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\t\t\u4ee3\u5165\u306f\u3001\u5909\u6570x\u304c\u5de6\u8fba\u3001\u4ee3\u5165\u3059\u308b\u502410\u304c\u53f3\u8fba\u3067\u300c=\u300d\u3092\u4f7f\u3063\u3066\u4ee3\u5165\u3057\u307e\u3059\u3002<br \/>\n\t\t\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\u3092\u540c\u6642\u306b\u884c\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>int x = 10;<\/code><\/pre>\n<p>\t\t\u300cSystem.out.println(x);\u300d\u3067\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<br \/>\n\t\t\u5909\u6570\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5024\u3092\u51fa\u529b\u3059\u308b\u5834\u5408\u3001\u300c&quot;&quot;\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u3067\u56f2\u3046\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-2\"><span class=\"Num\">6.2.<\/span>\u554f\u984c2<\/h4>\n<p>\u6574\u6570\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5909\u6570\u300cage\u300d\u3092\u5ba3\u8a00\u3057\u3001\u305d\u306e\u5909\u6570\u300cage\u300d\u306b\u300c20\u300d\u3092\u4ee3\u5165\u3057\u3001\u5909\u6570\u300cage\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u305d\u306e\u3042\u3068\u3001\u7d9a\u3044\u3066\u5909\u6570\u300cage\u300d\u306b\u300c25\u300d\u3092\u4ee3\u5165\u3057\u3001\u300cage\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-2\"><label for=\"Answer-content-2\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai6_2.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a\u5909\u6570age\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\u5f8c\u3001\u7570\u306a\u308b\u5024\u3092\u518d\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_2 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ int\u578b\u5909\u6570age\u306e\u5ba3\u8a00\u3068\u502420\u306e\u4ee3\u5165\r\n\t\tint age = 20;\r\n\r\n\t\t\/\/ \u5909\u6570age\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(age);\r\n\r\n\t\t\/\/ \u5909\u6570age\u306b\u502425\u3092\u518d\u4ee3\u5165\r\n\t\tage = 25;\r\n\r\n\t\t\/\/ \u518d\u4ee3\u5165\u3057\u305f\u5909\u6570age\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(age);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\t\u5909\u6570\u306e\u4ee3\u5165\u304a\u3088\u3073\u518d\u4ee3\u5165\u306e\u554f\u984c\u3067\u3059\u3002<br \/>\n\t\tint\u578b\u5909\u6570age\u3092\u5ba3\u8a00\u3057\u300120\u3092\u4ee3\u5165\u3057\u305f\u5f8c\u306b\u3001\u5909\u6570age\u306e\u5024\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<br \/>\n\t\t\u305d\u306e\u3042\u3068\u306b\u300125\u3092\u518d\u4ee3\u5165\u3057\u3001\u518d\u5ea6\u5909\u6570age\u306e\u5024\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>\t\t\u518d\u4ee3\u5165\u306e\u3068\u304d\u306b\u3001\u300cint age = 25;\u300d\u3068\u8a18\u8ff0\u3059\u308b\u3068\u3001\u5909\u6570\u5ba3\u8a00\u306e\u91cd\u8907\u3068\u306a\u308a\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\t\t\u5909\u6570\u3092\u5ba3\u8a00\u3057\u305f\u5f8c\u306b\u3001\u5024\u3092\u4ee3\u5165\u3059\u308b\u5834\u5408\u3001\u305d\u306e\u5909\u6570\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u4e0a\u3067\u3059\u3067\u306b\u8a8d\u8b58\u3055\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u3082\u3046\u4e00\u5ea6\u30c7\u30fc\u30bf\u578b\u3092\u6307\u5b9a\u3057\u3066\u5909\u6570\u306e\u5ba3\u8a00\u3092\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-3\"><span class=\"Num\">6.3.<\/span>\u554f\u984c3<\/h4>\n<p>\u6574\u6570\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5909\u6570\u300cpopulation\u300d\u3092\u5ba3\u8a00\u3057\u3001\u305d\u306e\u5909\u6570\u300cpopulation\u300d\u306b\u300c6800000000\u300d\u3092\u4ee3\u5165\u3057\u3001\u5909\u6570\u300cpopulation\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><span class=\"Text-highlight\">\u203b\u3053\u306e\u554f\u984c\u306e\u89e3\u7b54\u306f\u63b2\u8f09\u3057\u3066\u304a\u308a\u307e\u305b\u3093\u3002<span class=\"Post-link\" >Tech Fun IT\u30b9\u30af\u30fc\u30eb\u306eJava\u7814\u4fee<\/span>\u3067\u306f\u3001\u8b1b\u5e2b\u304c\u4e01\u5be7\u306b\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/span><br \/>\n<span class=\"Text-red-bold\">\u73fe\u5728Tech Fun IT\u30b9\u30af\u30fc\u30eb\u3067\u306f\u3001\u65b0\u898f\u53d7\u8b1b\u8005\u306e\u52df\u96c6\u306f\u884c\u306a\u3063\u3066\u304a\u308a\u307e\u305b\u3093\u3002<\/span><\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-4\"><span class=\"Num\">6.4.<\/span>\u554f\u984c4<\/h4>\n<p>\u6587\u5b57\u5217\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5909\u6570\u300caddress\u300d\u3092\u5ba3\u8a00\u3057\u3001\u305d\u306e\u5909\u6570\u300caddress\u300d\u306b\u300c\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a\u300d\u3092\u4ee3\u5165\u3057\u3001\u5909\u6570\u300caddress\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u305d\u306e\u3042\u3068\u3001\u305d\u306e\u5909\u6570\u300caddress\u300d\u306b\u300c\u6771\u4eac\u90fd\u53f0\u6771\u533a\u300d\u3092\u518d\u4ee3\u5165\u3057\u3001\u300caddress\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-3\"><label for=\"Answer-content-3\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai6_4.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a\u6587\u5b57\u5217\u578b\u5909\u6570address\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\u304a\u3088\u3073\u518d\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_4 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ String\u578b\u5909\u6570address\u306b\u6587\u5b57\u5217\u3092\u4ee3\u5165\r\n\t\tString address = \"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a\";\r\n\r\n\t\t\/\/ \u5909\u6570address\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(address);\r\n\r\n\t\t\/\/ \u5909\u6570address\u306b\u6587\u5b57\u5217\u3092\u518d\u4ee3\u5165\r\n\t\taddress = \"\u6771\u4eac\u90fd\u53f0\u6771\u533a\";\r\n\r\n\t\t\/\/ \u5909\u6570address\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(address);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\tString\u578b\u5909\u6570address\u306b\u6587\u5b57\u5217\u3092\u4ee3\u5165\u3057\u3001System.out.println\u3067\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<br \/>\n\t\t\u6587\u5b57\u5217\u3092\u4ee3\u5165\u3059\u308b\u5834\u5408\u3001\u4ee3\u5165\u3059\u308b\u6587\u5b57\u5217\u3092\u300c&quot;&quot;\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u3067\u56f2\u3063\u3066\u8868\u8a18\u3057\u306a\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u305f\u3081\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\t\taddress\u306b\u6587\u5b57\u5217\u3092\u518d\u4ee3\u5165\u3057\u307e\u3059\u304c\u3001address\u306e\u524d\u306b\u518d\u5ea6String\u3068\u8a18\u8ff0\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u5909\u6570\u306e\u5ba3\u8a00\u304c\u91cd\u8907\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3001\u6c17\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-5\"><span class=\"Num\">6.5.<\/span>\u554f\u984c5<\/h4>\n<p>\u6587\u5b57\u5217\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5909\u6570\u300caisatsu\u300d\u3092\u5ba3\u8a00\u3057\u3001\u305d\u306e\u5909\u6570\u300caisatsu\u300d\u306b\u300c&quot;\u304a\u306f\u3088\u3046\u3054\u3056\u3044\u307e\u3059&quot;\u3001&quot;\u3053\u3093\u306b\u3061\u306f&quot;\u3001&quot;\u3053\u3093\u3070\u3093\u306f&quot;\u300d\u3092\u4ee3\u5165\u3057\u3001\u5909\u6570\u300caisatsu\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u203b \u300c&quot;\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u306f\u7279\u6b8a\u6587\u5b57\u3067\u3059\u3002\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u3046\u300c&quot;\uff08\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u300d\u306e\u524d\u306b\u306f\u3001\u300c\\\uff08\u5186\u30de\u30fc\u30af\uff09\u300d\u3092\u4ed8\u52a0\u3057\u3001\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><span class=\"Text-highlight\">\u203b\u3053\u306e\u554f\u984c\u306e\u89e3\u7b54\u306f\u63b2\u8f09\u3057\u3066\u304a\u308a\u307e\u305b\u3093\u3002<span class=\"Post-link\" >Tech Fun IT\u30b9\u30af\u30fc\u30eb\u306eJava\u7814\u4fee<\/span>\u3067\u306f\u3001\u8b1b\u5e2b\u304c\u4e01\u5be7\u306b\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/span><br \/>\n<span class=\"Text-red-bold\">\u73fe\u5728Tech Fun IT\u30b9\u30af\u30fc\u30eb\u3067\u306f\u3001\u65b0\u898f\u53d7\u8b1b\u8005\u306e\u52df\u96c6\u306f\u884c\u306a\u3063\u3066\u304a\u308a\u307e\u305b\u3093\u3002<\/span>\t<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-6\"><span class=\"Num\">6.6.<\/span>\u554f\u984c6<\/h4>\n<p>\u6574\u6570\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5909\u6570\u300coldTime\u300d\u3068\u300cnewTime\u300d\u3092\u5ba3\u8a00\u3057\u3001\u300coldTime\u300d\u306b\u300c8\u300d\u3092\u3001\u300cnewTime\u300d\u306b\u300c10\u300d\u3092\u4ee3\u5165\u3057\u3001\u305d\u308c\u305e\u308c\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u305d\u306e\u3042\u3068\u3001\u300coldTime\u300d\u306b\u300cnewTime\u300d\u306e\u5024\u3092\u4ee3\u5165\u3057\u3001\u300coldTime\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-4\"><label for=\"Answer-content-4\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai6_6.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a\u6574\u6570\u578b\u5909\u6570oldTime\u304a\u3088\u3073newTime\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\u304a\u3088\u3073\u518d\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_6 {\r\n\r\n\tpublic static void main(String[] args) {\r\n\r\n\t\t\/\/ int\u578b\u5909\u6570\u306e\u5ba3\u8a00\r\n\t\tint oldTime;\r\n\t\tint newTime;\r\n\r\n\t\t\/\/ \u5909\u6570\u306b\u5024\u3092\u4ee3\u5165\r\n\t\toldTime = 8;\r\n\t\tnewTime = 10;\r\n\r\n\t\t\/\/ \u5909\u6570\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(oldTime);\r\n\t\tSystem.out.println(newTime);\r\n\r\n\t\t\/\/ \u5909\u6570oldTime\u306b\u5909\u6570newTime\u306e\u5024\u3092\u4ee3\u5165\r\n\t\toldTime = newTime;\r\n\r\n\t\t\/\/ \u5909\u6570oldTime\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(oldTime);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\tint\u578b\u5909\u6570oldTime\u3068newTime\u3092\u5b9a\u7fa9\u3057\u3001\u305d\u308c\u305e\u308c\u306b\u5024\u3092\u4ee3\u5165\u3057\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<br \/>\n\t\t\u305d\u306e\u3042\u3068\u306b\u3001oldTime\u306bnewTime\u306e\u502410\u3092\u4ee3\u5165\u3057\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>\t\t\u3042\u308b\u5909\u6570\u306b\u5165\u3063\u3066\u3044\u308b\u5024\u3092\u5225\u306e\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u5834\u5408\u3001\u30c7\u30fc\u30bf\u578b\u304c\u540c\u3058\u3067\u3042\u308c\u3070\u3001\u901a\u5e38\u306e\u4ee3\u5165\u5f0f\u3067\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-7\"><span class=\"Num\">6.7.<\/span>\u554f\u984c7<\/h4>\n<p>float\u578b\u306e\u5b9a\u6570\u300cENSYU_RITSU\u300d\u3092\u5ba3\u8a00\u3057\u3001\u5b9a\u6570\u5024\u300c3.14\u300d\u3092\u4ee3\u5165\u3057\u3001\u305d\u306e\u5b9a\u6570\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-5\"><label for=\"Answer-content-5\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai6_7.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1afloat\u578b\u5b9a\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_7 {\r\n\tpublic static void main(String[] args) {\r\n\r\n\t\t\/\/ float\u578b\u5b9a\u6570ENSYU_RITSU\u306e\u5ba3\u8a00\u3068\u5024\u306e\u4ee3\u5165\r\n\t\tfinal float ENSYU_RITSU = 3.14F;\r\n\r\n\t\t\/\/ \u5b9a\u6570ENSYU_RITSU\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(ENSYU_RITSU);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\t\u5b9a\u6570\u3092\u5ba3\u8a00\u3059\u308b\u5834\u5408\u3001\u5909\u6570\u306e\u5b9a\u7fa9\u306e\u524d\u306b\u300cfinal\u300d\u3092\u4ed8\u52a0\u3057\u307e\u3059\u3002<br \/>\n\t\t\u5b9a\u6570\u306f\u3001\u6587\u6cd5\u4e0a\u306e\u30eb\u30fc\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u901a\u4f8b\u3068\u3057\u3066\u5927\u6587\u5b57\u3067\u5b9a\u7fa9\u3057\u307e\u3059\u3002<br \/>\n\t\t\u307e\u305f\u3001float\u578b\u306e\u5909\u6570\u304a\u3088\u3073\u5b9a\u6570\u306b\u5024\u3092\u4ee3\u5165\u3059\u308b\u5834\u5408\u3001\u5024\u306e\u5f8c\u306b\u300cF\u300d\u53c8\u306f\u300cf\u300d\u3092\u8868\u8a18\u3059\u308b\u3088\u3046\u306b\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002\n\t<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-8\"><span class=\"Num\">6.8.<\/span>\u554f\u984c8<\/h4>\n<p>\u6587\u5b57\u5217\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5b9a\u6570\u300cFILE_PATH\u300d\u3092\u5ba3\u8a00\u3057\u3001\u5b9a\u6570\u5024\u300cC:\\temp\\test.txt\u300d\u3092\u4ee3\u5165\u3057\u3001\u305d\u306e\u5b9a\u6570\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u203b\u300c\\\uff08\u5186\u30de\u30fc\u30af\uff09\u300d\u306f\u7279\u6b8a\u6587\u5b57\u3067\u3059\u3002\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u3046\u300c\\\u300d\u306e\u524d\u306b\u306f\u3001\u3082\u30461\u3064\u300c\\\uff08\u5186\u30de\u30fc\u30af\uff09\u300d\u3092\u4ed8\u52a0\u3057\u3001\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-6\"><label for=\"Answer-content-6\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai6_8.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a\u6587\u5b57\u5217\u578b\u5b9a\u6570\u306e\u5ba3\u8a00\u3068\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u5229\u7528\u3057\u305f\u5024\u306e\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_8 {\r\n\tpublic static void main(String[] args) {\r\n\r\n\t\t\/\/ \u6587\u5b57\u5217\u578b\u306e\u5b9a\u6570FILE_PATH\u306e\u5ba3\u8a00\r\n\t\tfinal String FILE_PATH;\r\n\r\n\t\t\/\/ \u5b9a\u6570FILE_PATH\u306b\u5024\u306e\u4ee3\u5165\r\n\t\tFILE_PATH = \"C:\\\\temp\\\\test.txt\";\r\n\r\n\t\t\/\/ \u5b9a\u6570FILE_PATH\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(FILE_PATH);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\t\u5b9a\u6570\u3092\u5ba3\u8a00\u3059\u308b\u5834\u5408\u3001\u5909\u6570\u306e\u5b9a\u7fa9\u306e\u524d\u306b\u300cfinal\u300d\u3092\u4ed8\u52a0\u3057\u307e\u3059\u3002<br \/>\n\t\t\u6587\u5b57\u5217\u578b\u306e\u5b9a\u6570\u306b\u300cC:\\temp\\test.txt\u300d\u3092\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u300c\\\uff08\u5186\u30de\u30fc\u30af\uff09\u300d\u304c\u7279\u6b8a\u6587\u5b57\u3067\u3042\u308b\u305f\u3081\u3001\u305d\u306e\u307e\u307eFILE_PATH\u306b\u4ee3\u5165\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u300c\\temp\u300d\u3068\u300c\\test\u300d\u306e\u90e8\u5206\u3067\u300c\\t\u300d\uff08\u30bf\u30d6\u30b9\u30da\u30fc\u30b9\uff09\u3068\u8a8d\u8b58\u3055\u308c\u3066\u3057\u307e\u3044\u3001\u305d\u306e\u307e\u307e\u51fa\u529b\u3059\u308b\u3068\u3001\u300cC:<br \/>\n\t\temp est.txt\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\t\t\u305d\u306e\u305f\u3081\u3001\u4ee3\u5165\u3059\u308b\u300c\\\uff08\u5186\u30de\u30fc\u30af\uff09\u300d\u306e\u524d\u306b\u30a8\u30b9\u30b1\u30fc\u30d7\u6587\u5b57\u3068\u3057\u3066\u306e\u300c\\\uff08\u5186\u30de\u30fc\u30af\uff09\u300d\u3092\u4ed8\u52a0\u3057\u3001\u300cC:\\\\temp\\\\test.txt\u300d\u3068\u8868\u8a18\u3057\u3066\u3001\u4ee3\u5165\u3057\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-9\"><span class=\"Num\">6.9.<\/span>\u554f\u984c9<\/h4>\n<p>float\u578b\u306e\u5909\u6570\u300chensu1\u300d\u3092\u5ba3\u8a00\u3057\u3001\u300c5.4321\u300d\u3092\u4ee3\u5165\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u307e\u305f\u3001int\u578b\u306e\u5909\u6570\u300chensu2\u300d\u306b\u300chensu1\u300d\u306e\u5024\u3092\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4ee3\u5165\u3057\u3001\u300chensu2\u300d\u306e\u5024\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-7\"><label for=\"Answer-content-7\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai6_9.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1afloat\u578b\u306e\u5909\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\u304a\u3088\u3073int\u578b\u306e\u5909\u6570\u306b\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_9 {\r\n\r\n\tpublic static void main(String[] args) {\r\n\r\n\t\t\/\/ float\u578b\u5909\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\r\n\t\tfloat hensu1 = 5.4321F;\r\n\r\n\t\t\/\/ int\u578b\u5909\u6570\u306e\u5ba3\u8a00\r\n\t\tint hensu2;\r\n\r\n\t\t\/\/ hensu2\u306bhensu1\u306e\u5024\u3092\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4ee3\u5165\r\n\t\thensu2 = (int) hensu1;\r\n\r\n\t\t\/\/ hensu2\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(hensu2);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\tfloat\u578b\u5909\u6570\u306b\u4ee3\u5165\u3055\u308c\u305f\u5c0f\u6570\u306e\u5024\u3092\u3001int\u578b\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u5834\u5408\u3001\u30ad\u30e3\u30b9\u30c8\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n\t\t\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4ee3\u5165\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u6574\u6570\u90e8\u306e\u307f\u304c\u4ee3\u5165\u3055\u308c\u308b\u305f\u3081\u3001\u6700\u7d42\u7684\u306a\u51fa\u529b\u7d50\u679c\u306f\u300c5\u300d\u3068\u306a\u308a\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-6-10\"><span class=\"Num\">6.10.<\/span>\u554f\u984c10<\/h4>\n<p>\u4ee5\u4e0b\u306e\u30bd\u30fc\u30b9\u306e\u30b3\u30e1\u30f3\u30c8\u306b\u5f93\u3044\u3001\u554f\u984c\u306b\u6cbf\u3063\u305f\u30b3\u30fc\u30c9\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u30bd\u30fc\u30b9\u306e\u300c\/*\u3053\u3053\u306b\u8ffd\u52a0*\/\u300d\u306e\u90e8\u5206\u306b\u8ffd\u52a0\u3057\u3001 \u5b9f\u884c\u7d50\u679c\u3068\u540c\u69d8\u306b\u51fa\u529b\u3055\u308c\u308b\u3088\u3046\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b8c\u6210\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Pre-title\">Mondai6_10.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1avar\u3092\u4f7f\u3063\u305f\u306e\u5909\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\u304a\u3088\u3073\u3001\u30ad\u30e3\u30b9\u30c8\u3068\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_10 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ float\u578b\u306e\u5909\u6570hensu1\u306e\u5ba3\u8a00\u3057\u300c2147483648.234\u300d\u306e\u5024\u3092\u4ee3\u5165\u3057\u307e\u3057\u3087\u3046\u3002\r\n\t\tvar hensu1 = \/* \u3053\u3053\u306b\u8ffd\u52a0 *\/;\r\n\r\n\t\t\/\/ \u5909\u6570hensu2\u3092\u5ba3\u8a00\u3057\u3001hensu1\u306e\u5024\u3092\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4ee3\u5165\u3057\u307e\u3057\u3087\u3046\u3002\r\n\t\tvar hensu2 = \/* \u3053\u3053\u306b\u8ffd\u52a0 *\/;\r\n\r\n\t\t\/\/ hensu2\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(hensu2);\r\n\t}\r\n}<\/code><\/pre>\n<div class=\"Pre-title\">\u5b9f\u884c\u7d50\u679c<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>2147483648<\/code><\/pre>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-8\"><label for=\"Answer-content-8\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai6_10.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1avar\u3092\u4f7f\u3063\u305f\u306e\u5909\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\u304a\u3088\u3073\u3001\u30ad\u30e3\u30b9\u30c8\u3068\u4ee3\u5165\r\n *\/\r\npublic class Mondai6_10 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ float\u578b\u306e\u5909\u6570hensu1\u306e\u5ba3\u8a00\u3057\u300c2147483648.234\u300d\u306e\u5024\u3092\u4ee3\u5165\u3057\u307e\u3057\u3087\u3046\u3002\r\n\t\tvar hensu1 = 2147483648.234F;\r\n\r\n\t\t\/\/ \u5909\u6570hensu2\u3092\u5ba3\u8a00\u3057\u3001hensu1\u306e\u5024\u3092\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4ee3\u5165\u3057\u307e\u3057\u3087\u3046\u3002\r\n\t\tvar hensu2 = (long) hensu1;\r\n\r\n\t\t\/\/ hensu2\u306e\u5024\u3092\u51fa\u529b\r\n\t\tSystem.out.println(hensu2);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\tvar\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u5909\u6570\u5ba3\u8a00\u3067\u306e\u578b\u306e\u8a18\u8ff0\u3092\u7701\u7565\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\t\tfloat\u578b\u306e\u5909\u6570\u3092\u6574\u6570\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4ee3\u5165\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u6574\u6570\u90e8\u306e\u307f\u304c\u4ee3\u5165\u3055\u308c\u307e\u3059\u3002<br \/>\n\t\t\u5b9f\u884c\u7d50\u679c\u306e\u5024\u306f\u3001int\u578b\u306e\u7bc4\u56f2\u3088\u308a\u5927\u304d\u3044\u6570\u5b57\u3067\u3042\u308b\u305f\u3081\u3001\u3053\u3053\u3067\u306flong\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4ee3\u5165\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<div class=\"Separator\">\n<div class=\"Separator__child\"><\/div>\n<\/div>\n<h3 class=\"Heading Title Title--m\" id=\"Bookmark-7\"><span class=\"Num\">7.<\/span>\u6f14\u7b97\u5b50<\/h3>\n<p>Java\u306b\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u7a2e\u985e\u306e\u6f14\u7b97\u5b50\u304c\u3042\u308a\u307e\u3059\u3002\u6f14\u7b97\u5b50\u3068\u306f\u3001\u30c7\u30fc\u30bf\uff08\u5024\uff09\u306e\u8a08\u7b97\u51e6\u7406\u3092\u884c\u3063\u305f\u308a\u3059\u308b\u3082\u306e\u3067\u3059\u3002<br \/>\n\u3053\u3053\u3067\u306f\u3001\u305d\u308c\u3089\u306e\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3059\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-7-1\"><span class=\"Num\">7.1.<\/span>\u4ee3\u5165\u6f14\u7b97\u5b50<\/h4>\n<p>\u3053\u308c\u306f\u3001\u300c\u4ee3\u5165\u300d\u306e\u9805\u3067\u65e2\u306b\u5b66\u7fd2\u3057\u305f\u6f14\u7b97\u5b50\u3067\u3001\u53f3\u8fba\uff08\u30a4\u30b3\u30fc\u30eb\u306e\u53f3\u5074\uff09\u306e\u5024\u3092\u5de6\u8fba\uff08\u30a4\u30b3\u30fc\u30eb\u306e\u5de6\u5074\uff09\u306b\u4ee3\u5165\u3059\u308b\u6f14\u7b97\u5b50\u3067\u3059\u3002<br \/>\n\u901a\u5e38\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u4e0a\u304b\u3089\u4e0b\u3001\u5de6\u304b\u3089\u53f3\u306b\u51e6\u7406\u3055\u308c\u307e\u3059\u304c\u3001\u4ee3\u5165\u6f14\u7b97\u5b50\u306e\u5834\u5408\u3001\u53f3\u8fba\u304b\u3089\u5de6\u8fba\u306b\u4ee3\u5165\u3059\u308b\u306e\u3067\u3001\u9593\u9055\u3048\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-7-2\"><span class=\"Num\">7.2.<\/span>\u7b97\u8853\u6f14\u7b97\u5b50<\/h4>\n<p>\u7b97\u8853\u6f14\u7b97\u5b50\u3068\u306f\u3001\u6570\u5b66\u3067\u3082\u3088\u304f\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u3001\u52a0\u7b97\u3001\u6e1b\u7b97\u3001\u4e57\u7b97\u3001\u9664\u7b97\u306a\u3069\u306e\u6f14\u7b97\u5b50\u306e\u3053\u3068\u3067\u3059\u3002<br \/>\n\u57fa\u672c\u7684\u306a\u7b97\u8853\u6f14\u7b97\u5b50\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<colgroup>\n<col>\n<col>\n<col>\n\t<\/colgroup>\n<thead>\n<tr>\n<th>\u7b97\u8853\u6f14\u7b97\u5b50<\/th>\n<th>\u8aac\u660e<\/th>\n<th>\u8a18\u8ff0\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n\t\t\t\t&#43;\uff08\u30d7\u30e9\u30b9\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u52a0\u7b97\u3001\u8db3\u3059\n\t\t\t<\/td>\n<td>\n\t\t\t\tx &#43; y\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t&#45;\uff08\u30de\u30a4\u30ca\u30b9\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u6e1b\u7b97\u3001\u5f15\u304f\n\t\t\t<\/td>\n<td>\n\t\t\t\tx &#45; y\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t*\uff08\u30a2\u30b9\u30bf\u30ea\u30b9\u30af\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u4e57\u7b97\u3001\u639b\u3051\u308b\n\t\t\t<\/td>\n<td>\n\t\t\t\tx * y\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t\/\uff08\u30b9\u30e9\u30c3\u30b7\u30e5\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u9664\u7b97\u3001\u5272\u308b\n\t\t\t<\/td>\n<td>\n\t\t\t\tx \/ \uff59\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t%\uff08\u30d1\u30fc\u30bb\u30f3\u30c8\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u5270\u4f59\u3001\u5272\u3063\u305f\u4f59\u308a\n\t\t\t<\/td>\n<td>\n\t\t\t\tx % y\n\t\t\t<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u66f8\u304f\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Enzanshi1.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi1 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 10; \/\/ \u5909\u6570x\u306e\u5ba3\u8a00\u306810\u306e\u4ee3\u5165\r\n\t\tint y = 2; \/\/ \u5909\u6570y\u306e\u5ba3\u8a00\u30682\u306e\u4ee3\u5165\r\n\r\n\t\tint a = x + y; \/\/ \u5909\u6570a\u306e\u5ba3\u8a00\u3068x\u3068y\u306e\u52a0\u7b97\u7d50\u679c\u306e\u4ee3\u5165\r\n\t\tint b = x - y; \/\/ \u5909\u6570b\u306e\u5ba3\u8a00\u3068x\u3068y\u306e\u6e1b\u7b97\u7d50\u679c\u306e\u4ee3\u5165\r\n\t\tint c = x * y; \/\/ \u5909\u6570c\u306e\u5ba3\u8a00\u3068x\u3068y\u306e\u4e57\u7b97\u7d50\u679c\u306e\u4ee3\u5165\r\n\t\tint d = x \/ y; \/\/ \u5909\u6570d\u306e\u5ba3\u8a00\u3068x\u3068y\u306e\u9664\u7b97\u7d50\u679c\u306e\u4ee3\u5165\r\n\t\tint e = x % y; \/\/ \u5909\u6570e\u306e\u5ba3\u8a00\u3068x\u3068y\u306e\u5270\u4f59\u7d50\u679c\u306e\u4ee3\u5165\r\n\t}\r\n}<\/code><\/pre>\n<p>\u540c\u3058\u30c7\u30fc\u30bf\u578b\u306e\u5909\u6570\u3084\u30c7\u30fc\u30bf\u540c\u58eb\u306e\u6f14\u7b97\u306f\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u7570\u306a\u308b\u30c7\u30fc\u30bf\u578b\u540c\u58eb\u306e\u5834\u5408\u306f\u3001\u8a08\u7b97\u7d50\u679c\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n\u8a08\u7b97\u5f0f\u3067\u4f7f\u7528\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306e\u30c7\u30fc\u30bf\u578b\u306e\u4e2d\u3067\u3001\u4e00\u756a\u5927\u304d\u3044\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u578b\u304c\u3001\u8a08\u7b97\u7d50\u679c\u306e\u30c7\u30fc\u30bf\u578b\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001int\u578b\u306e\u30c7\u30fc\u30bf\u3068double\u578b\u306e\u30c7\u30fc\u30bf\u3067\u4e57\u7b97\u3057\u305f\u5834\u5408\u3001\u8a08\u7b97\u7d50\u679c\u306f\u3001double\u578b\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u305d\u306e\u4f8b\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Enzanshi2.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi2 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 10; \/\/ int\u578b\u5909\u6570x\u306e\u5ba3\u8a00\u306810\u306e\u4ee3\u5165\r\n\t\tdouble y = 1.4142; \/\/ double\u578b\u5909\u6570y\u306e\u5ba3\u8a00\u30681.4142\u306e\u4ee3\u5165\r\n\r\n\t\tdouble a = x * y; \/\/ \u5909\u6570a\u306e\u5ba3\u8a00\u3068x\u3068y\u306e\u4e57\u7b97\u7d50\u679c\u306e\u4ee3\u5165\r\n\r\n\t\tSystem.out.println(a); \/\/ \u5909\u6570a\u306e\u502414.142\u3092\u51fa\u529b\r\n\t}\r\n}<\/code><\/pre>\n<p>\u307e\u305f\u3001int\u578b\u306e\u5909\u6570\u307e\u305f\u306f\u30c7\u30fc\u30bf\u540c\u58eb\u306e\u9664\u7b97\u3067\u5272\u308a\u5207\u308c\u306a\u3044\u5834\u5408\u3001\u8a08\u7b97\u7d50\u679c\u306e <span class=\"Text-highlight\">\u5c0f\u6570\u70b9\u4ee5\u4e0b\u306f\u5207\u308a\u6368\u3066\u3089\u308c\u3066\u3001<\/span>int\u578b\u306e\u7d50\u679c\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u305d\u306e\u4f8b\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Enzanshi3.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi3 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 15; \/\/ int\u578b\u5909\u6570x\u306e\u5ba3\u8a00\u306815\u306e\u4ee3\u5165\r\n\t\tint y = 2; \/\/ int\u578b\u5909\u6570y\u306e\u5ba3\u8a00\u30682\u306e\u4ee3\u5165\r\n\r\n\t\tint a = x \/ y; \/\/ int\u578b\u5909\u6570a\u306e\u5ba3\u8a00\u3068x\u3068y\u306e\u9664\u7b97\u7d50\u679c\u306e\u4ee3\u5165\r\n\t\t\t\t\t\t\t\t\t \/\/\uff087.5\u306e\u5c0f\u6570\u70b9\u4ee5\u4e0b\u306f\u5207\u308a\u6368\u3066\u3089\u308c\u30017\u304c\u4ee3\u5165\u3055\u308c\u307e\u3059\uff09\r\n\r\n\t\tSystem.out.println(a); \/\/ \u5909\u6570a\u306e\u50247\u3092\u51fa\u529b\r\n\t}\r\n}<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u4f8b\u3067\u3001\u5c0f\u6570\u70b9\u4ee5\u4e0b\u3082\u542b\u3081\u305f\u6b63\u78ba\u306a\u7d50\u679c\u3092\u51fa\u529b\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u8a08\u7b97\u306e\u5143\u3068\u306a\u308b\u4e8c\u3064\u306e\u5909\u6570\u306e\u3069\u3061\u3089\u304b\u3092double\u578b\u3078\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u8a08\u7b97\u7d50\u679c\u306e\u5909\u6570\u3092double\u578b\u306b\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n\u8a08\u7b97\u306e\u5143\u3068\u306a\u308b\u5909\u6570\u306e1\u3064\u3092\u5927\u304d\u3044\u30c7\u30fc\u30bf\u578b\u306b\u5909\u63db\u3059\u308b\u3068\u3001\u7bc4\u56f2\u304c\u5927\u304d\u3044\u30c7\u30fc\u30bf\u578b\u306b\u5408\u308f\u305b\u3066\u8a08\u7b97\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u6b63\u3057\u3044\u8a08\u7b97\u7d50\u679c\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Enzanshi4.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi4 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 15; \/\/ int\u578b\u5909\u6570x\u306e\u5ba3\u8a00\u306815\u306e\u4ee3\u5165\r\n\t\tint y = 2; \/\/ int\u578b\u5909\u6570y\u306e\u5ba3\u8a00\u30682\u306e\u4ee3\u5165\r\n\r\n\t\tdouble a = (double)x \/ y; \/\/ x\u3092\u30ad\u30e3\u30b9\u30c8\u3057\u305f\u5f8c\u306b\u9664\u7b97\u3057\u3001\u5909\u6570a\u306b\u4ee3\u5165\r\n\r\n\t\tSystem.out.println(a); \/\/ \u5909\u6570a\u306e\u50247.5\u3092\u51fa\u529b\r\n\t}\r\n}<\/code><\/pre>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-7-3\"><span class=\"Num\">7.3.<\/span>\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u6f14\u7b97\u5b50\u3068\u30c7\u30af\u30ea\u30e1\u30f3\u30c8\u6f14\u7b97\u5b50<\/h4>\n<p>\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u6f14\u7b97\u5b50\u306f\u3001\u6570\u5024\u578b\u306e\u5909\u6570\u306b1\u3092\u8db3\u3059\u6f14\u7b97\u5b50\u3067\u3059\u3002\u30c7\u30af\u30ea\u30e1\u30f3\u30c8\u6f14\u7b97\u5b50\u306f\u30011\u3092\u5f15\u304f\u6f14\u7b97\u5b50\u3067\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<colgroup>\n<col>\n<col>\n<col>\n\t<\/colgroup>\n<thead>\n<tr>\n<th>\u6f14\u7b97\u5b50<\/th>\n<th>\u8aac\u660e<\/th>\n<th>\u8a18\u8ff0\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n\t\t\t\t&#43;&#43;\uff08\u30d7\u30e9\u30b9\u30d7\u30e9\u30b9\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t1\u3092\u52a0\u7b97\n\t\t\t<\/td>\n<td>\n\t\t\t\ti&#43;&#43;\u3001&#43;&#43;i\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t&#45;&#45;\uff08\u30de\u30a4\u30ca\u30b9\u30de\u30a4\u30ca\u30b9\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t1\u3092\u6e1b\u7b97\n\t\t\t<\/td>\n<td>\n\t\t\t\ti&#45;&#45;\u3001&#45;&#45;i\n\t\t\t<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>1\u3092\u52a0\u7b97\u3059\u308b\u3053\u3068\u3092\u3001\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u3068\u547c\u3073\u30011\u3092\u6e1b\u7b97\u3059\u308b\u3053\u3068\u3092\u3001\u30c7\u30af\u30ea\u30e1\u30f3\u30c8\u3068\u547c\u3073\u307e\u3059\u3002<br \/>\n\u3053\u306e\u300c&#43;&#43;\u300d\u3084\u300c&#45;&#45;\u300d\u3092\u5909\u6570\u306e\u524d\u306b\u8a18\u8ff0\u3059\u308b\u5834\u5408\u3068\u3001\u5f8c\u306b\u8a18\u8ff0\u3059\u308b\u5834\u5408\u3067\u30011\u3092\u52a0\u7b97\uff08\u307e\u305f\u306f\u3001\u6e1b\u7b97\uff09\u3059\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u304c\u7570\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u6c17\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u66f8\u304f\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u3067\u3059\u304c\u3001\u30c7\u30af\u30ea\u30e1\u30f3\u30c8\u306e\u5834\u5408\u3082\u3001\u540c\u69d8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\" Pre-title\">Enzanshi5.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi5 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint i = 1; \/\/ \u5909\u6570i\u306e\u5ba3\u8a00\u30681\u306e\u4ee3\u5165\r\n\t\tint j = 1; \/\/ \u5909\u6570j\u306e\u5ba3\u8a00\u30681\u306e\u4ee3\u5165\r\n\r\n\t\tint a = i++; \/\/ \u5909\u6570a\u306e\u5ba3\u8a00\u3068i\u306e\u50241\u3092\u4ee3\u5165\u3057\u3001i\u306b1\u3092\u52a0\u7b97\r\n\t\tint b = ++j; \/\/ \u5909\u6570b\u306e\u5ba3\u8a00\u3068j\u306e\u50241\u306b1\u3092\u52a0\u7b97\u3057\u3001j\u306e\u50242\u3092\u4ee3\u5165\r\n\t}\r\n}<\/code><\/pre>\n<p>\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u6f14\u7b97\u5b50\u306f\u3088\u304f\u4f7f\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u306e\u8a18\u8ff0\u306e\u4ed5\u65b9\u306f\u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-7-4\"><span class=\"Num\">7.4.<\/span>\u8907\u5408\u4ee3\u5165\u6f14\u7b97\u5b50<\/h4>\n<p>\u8907\u5408\u4ee3\u5165\u6f14\u7b97\u5b50\u306f\u3001\u300cx = x &#43; 5\u300d\u3092\u300cx &#43;= 5\u300d\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u6f14\u7b97\u5b50\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<colgroup>\n<col>\n<col>\n<col>\n\t<\/colgroup>\n<thead>\n<tr>\n<th class=\"Nowrap\">\u8907\u5408\u4ee3\u5165\u6f14\u7b97\u5b50<\/th>\n<th>\u8aac\u660e<\/th>\n<th class=\"Nowrap\">\u8a18\u8ff0\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"Nowrap\">&#43;=\uff08\u30d7\u30e9\u30b9\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u306e\u5909\u6570\u306e\u5024\u306b\u53f3\u8fba\u306e\u5024\u3092\u52a0\u7b97\u3057\u3001\u305d\u306e\u8a08\u7b97\u7d50\u679c\u3092\u5de6\u8fba\u306e\u5909\u6570\u306b\u4ee3\u5165<\/td>\n<td class=\"Nowrap\">x &#43;= 5<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">&#45;=\uff08\u30de\u30a4\u30ca\u30b9\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u306e\u5909\u6570\u306e\u5024\u304b\u3089\u53f3\u8fba\u306e\u5024\u3092\u6e1b\u7b97\u3057\u3001\u305d\u306e\u8a08\u7b97\u7d50\u679c\u3092\u5de6\u8fba\u306e\u5909\u6570\u306b\u4ee3\u5165<\/td>\n<td class=\"Nowrap\">x &#45;= 5<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">*=\uff08\u30a2\u30b9\u30bf\u30ea\u30b9\u30af\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u306e\u5909\u6570\u306e\u5024\u306b\u53f3\u8fba\u306e\u5024\u3092\u4e57\u7b97\u3057\u3001\u305d\u306e\u8a08\u7b97\u7d50\u679c\u3092\u5de6\u8fba\u306e\u5909\u6570\u306b\u4ee3\u5165<\/td>\n<td class=\"Nowrap\">x *= 5<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">\/=\uff08\u30b9\u30e9\u30c3\u30b7\u30e5\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u306e\u5909\u6570\u306e\u5024\u3092\u53f3\u8fba\u306e\u5024\u3067\u9664\u7b97\u3057\u3001\u305d\u306e\u8a08\u7b97\u7d50\u679c\u3092\u5de6\u8fba\u306e\u5909\u6570\u306b\u4ee3\u5165<\/td>\n<td class=\"Nowrap\">x \/= 5<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">%=\uff08\u30d1\u30fc\u30bb\u30f3\u30c8\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u306e\u5909\u6570\u306e\u5024\u3092\u53f3\u8fba\u306e\u5024\u3067\u9664\u7b97\u3057\u305f\u4f59\u308a\u3092\u5de6\u8fba\u306e\u5909\u6570\u306b\u4ee3\u5165<\/td>\n<td class=\"Nowrap\">x %= 5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8907\u5408\u6f14\u7b97\u5b50\u306f\u3001\u5fc5\u305a\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u901a\u5e38\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u306e\u5f62\u5f0f\u3067\u8a18\u8ff0\u3057\u3066\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u5c11\u3057\u8a18\u8ff0\u304c\u697d\u306b\u306a\u308b\u6f14\u7b97\u5b50\u3001\u3068\u3044\u3046\u7a0b\u5ea6\u306b\u899a\u3048\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-7-5\"><span class=\"Num\">7.5.<\/span>\u95a2\u4fc2\u6f14\u7b97\u5b50<\/h4>\n<p>\u95a2\u4fc2\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u306e\u5024\u304c\u6bd4\u8f03\u3055\u308c\u3066\u3001boolean\u578b\u306etrue\u307e\u305f\u306ffalse\u304c\u7d50\u679c\u3068\u3057\u3066\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<br \/>\n\u95a2\u4fc2\u6f14\u7b97\u5b50\u306f\u3001\u5f8c\u8ff0\u306e\u6761\u4ef6\u5206\u5c90\u3084\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3067\u983b\u7e41\u306b\u4f7f\u7528\u3055\u308c\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u95a2\u4fc2\u6f14\u7b97\u5b50\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<colgroup>\n<col>\n<col>\n<col>\n\t<\/colgroup>\n<thead>\n<tr>\n<th class=\"Nowrap\">\u95a2\u4fc2\u6f14\u7b97\u5b50<\/th>\n<th>\u8aac\u660e<\/th>\n<th>\u8a18\u8ff0\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"Nowrap\">==\uff08\u30a4\u30b3\u30fc\u30eb\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7b49\u3057\u3044\u304b<\/td>\n<td class=\"Nowrap\">x == y<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">!=\uff08\u30a8\u30af\u30b9\u30af\u30e9\u30e1\u30fc\u30b7\u30e7\u30f3\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7b49\u3057\u304f\u306a\u3044\u304b<\/td>\n<td class=\"Nowrap\">x != y<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">&gt;\uff08\u5927\u306a\u308a\uff09<\/td>\n<td>\u5de6\u8fba\u304c\u53f3\u8fba\u3088\u308a\u5927\u304d\u3044\u304b<\/td>\n<td class=\"Nowrap\">x &gt; y<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">&gt;=\uff08\u5927\u306a\u308a\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u304c\u53f3\u8fba\u3088\u308a\u5927\u304d\u3044\u304b\u3001\u307e\u305f\u306f\u7b49\u3057\u3044\u304b<\/td>\n<td class=\"Nowrap\">x &gt;= y<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">&lt;\uff08\u5c0f\u306a\u308a\uff09<\/td>\n<td>\u5de6\u8fba\u304c\u53f3\u8fba\u3088\u308a\u5c0f\u3055\u3044\u304b<\/td>\n<td class=\"Nowrap\">x &lt; y<\/td>\n<\/tr>\n<tr>\n<td class=\"Nowrap\">&lt;=\uff08\u5c0f\u306a\u308a\u30fb\u30a4\u30b3\u30fc\u30eb\uff09<\/td>\n<td>\u5de6\u8fba\u304c\u53f3\u8fba\u3088\u308a\u5c0f\u3055\u3044\u304b\u3001\u307e\u305f\u306f\u7b49\u3057\u3044\u304b<\/td>\n<td class=\"Nowrap\">x &lt;= y <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6bd4\u8f03\u7d50\u679c\u304c\u6b63\u3057\u3044\u5834\u5408\u3001true\u3068\u306a\u308a\u3001\u6b63\u3057\u304f\u306a\u3044\u5834\u5408\u3001false\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/compareenzan1.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/compareenzan1.png\" alt=\"compareenzan1\"><br \/>\n<\/a><\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/compareenzan2.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/compareenzan2.png\" alt=\"compareenzan2\"><br \/>\n<\/a><\/p>\n<div class=\"Pre-title\">Enzanshi6.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi6 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 10; \/\/ int\u578b\u5909\u6570x\u306e\u5ba3\u8a00\u306810\u306e\u4ee3\u5165\r\n\t\tint y = 10; \/\/ int\u578b\u5909\u6570y\u306e\u5ba3\u8a00\u306810\u306e\u4ee3\u5165\r\n\t\tSystem.out.println(x == y); \/\/ \u5909\u6570x\u3068y\u3092\u6bd4\u8f03\u3057\u305f\u7d50\u679ctrue\u3092\u51fa\u529b\r\n\r\n\t\ty = 20; \/\/ y\u306b20\u3092\u4ee3\u5165\r\n\t\tSystem.out.println(x == y); \/\/ \u5909\u6570x\u3068y\u3092\u6bd4\u8f03\u3057\u305f\u7d50\u679cfalse\u3092\u51fa\u529b\r\n\t}\r\n}<\/code><\/pre>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-7-6\"><span class=\"Num\">7.6.<\/span>\u8ad6\u7406\u6f14\u7b97\u5b50<\/h4>\n<p>\u8907\u6570\u306e\u95a2\u4fc2\u6f14\u7b97\u5b50\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u305f\u3081\u306e\u6f14\u7b97\u5b50\u3092\u8ad6\u7406\u6f14\u7b97\u5b50\u3068\u8a00\u3044\u307e\u3059\u3002<br \/>\n\u8ad6\u7406\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u8907\u96d1\u306a\u6761\u4ef6\u3092\u8868\u3059\u6bd4\u8f03\u5f0f\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u8ad6\u7406\u6f14\u7b97\u5b50\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<colgroup>\n<col>\n<col>\n<col>\n\t<\/colgroup>\n<thead>\n<tr>\n<th>\u8ad6\u7406\u6f14\u7b97\u5b50<\/th>\n<th>\u8aac\u660e<\/th>\n<th>\u8a18\u8ff0\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n\t\t\t\t&#038;&#038;\uff08\u30a2\u30f3\u30c9\u30fb\u30a2\u30f3\u30c9\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u5de6\u8fba\u306e\u6bd4\u8f03\u304ctrue\u3001\u304b\u3064\u53f3\u8fba\u306e\u6bd4\u8f03\u304ctrue\u304b\n\t\t\t<\/td>\n<td>\n\t\t\t\tx < y &#038;&#038; x> z\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td>\n\t\t\t\t||\uff08\u30d1\u30a4\u30d7\u30fb\u30d1\u30a4\u30d7\uff09\n\t\t\t<\/td>\n<td>\n\t\t\t\t\u5de6\u8fba\u306e\u6bd4\u8f03\u304ctrue\u3001\u307e\u305f\u306f\u53f3\u8fba\u306e\u6bd4\u8f03\u304ctrue\u304b\n\t\t\t<\/td>\n<td>\n\t\t\t\tx < y || x> z\n\t\t\t<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u66f8\u304f\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Enzanshi7.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi7 {\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 15; \/\/ int\u578b\u5909\u6570x\u306e\u5ba3\u8a00\u306815\u306e\u4ee3\u5165\r\n\t\tint y = 20; \/\/ int\u578b\u5909\u6570y\u306e\u5ba3\u8a00\u306820\u306e\u4ee3\u5165\r\n\t\tint z = 10; \/\/ int\u578b\u5909\u6570z\u306e\u5ba3\u8a00\u306810\u306e\u4ee3\u5165\r\n\r\n\t\t\/\/ \u5de6\u8fba\u304b\u3064\u53f3\u8fba\u304ctrue\u306e\u305f\u3081\u3001true\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\r\n\t\tSystem.out.println(x &lt; y &amp;&amp; x &gt; z);\r\n\r\n\t\t\/\/ \u5de6\u8fba\u304ctrue\u306e\u305f\u3081\u3001true\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\r\n\t\tSystem.out.println(x &lt; y || x &lt; z);\r\n\t}\r\n}<\/code><\/pre>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-7-7\"><span class=\"Num\">7.7.<\/span>\u6587\u5b57\u5217\u306e\u9023\u7d50<\/h4>\n<p>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4e16\u754c\u3067\u306f\u3001\u6587\u5b57\u5217\u3092\u3064\u306a\u304e\u5408\u308f\u305b\u308b\u305f\u3081\u306b\u3001\u300c&#43;\uff08\u30d7\u30e9\u30b9\uff09\u300d\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u300c&#43;\u300d\u3092\u4f7f\u7528\u3057\u3066\u6587\u5b57\u5217\u3092\u3064\u306a\u304e\u5408\u308f\u305b\u308b\u3053\u3068\u3092\u3001\u6587\u5b57\u5217\u306e\u9023\u7d50\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n<p>\u6570\u5b57\u306e\u6f14\u7b97\u3068\u306f\u3001\u6271\u3044\u304c\u7570\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u6c17\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a class=\"Ext Image-link\" href=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/stringenzan.png\"><br \/>\n\t<img decoding=\"async\" src=\"https:\/\/techfun.cc\/wp-content\/uploads\/2024\/06\/stringenzan.png\" alt=\"stringenzan\"><br \/>\n<\/a><\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u66f8\u304f\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Enzanshi8.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi8 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ String\u578b\u5909\u6570x\u306e\u5ba3\u8a00\u3068\u300cJava\u306f\u3001\u300d\u306e\u4ee3\u5165\r\n\t\tString x = \"Java\u306f\u3001\";\r\n\r\n\t\t\/\/ String\u578b\u5909\u6570y\u306e\u5ba3\u8a00\u3068\u300c\u697d\u3057\u3044\u300d\u306e\u4ee3\u5165\r\n\t\tString y = \"\u697d\u3057\u3044\";\r\n\r\n\t\t\/\/ \u5909\u6570x\u3068y\u3068\"\u3067\u3059\uff01\"\u3092\u9023\u7d50\u3057\u3066\u3001\u300cJava\u306f\u3001\u697d\u3057\u3044\u3067\u3059\uff01\u300d\u3092\u51fa\u529b\r\n\t\tSystem.out.println(x + y + \"\u3067\u3059\uff01\");\r\n\t}\r\n}<\/code><\/pre>\n<p>\u6587\u5b57\u5217\u306e\u5909\u6570\u3067\u306f\u306a\u304f\u3001\u6570\u5024\u578b\u306e\u5909\u6570\u3068\u306e\u9023\u7d50\u3082\u53ef\u80fd\u3067\u3059\u3002\u6f14\u7b97\u306e\u4e2d\u306b\u3001\u6587\u5b57\u5217\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3068\u3001\u6587\u5b57\u5217\u306e\u9023\u7d50\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">Enzanshi9.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>public class Enzanshi9 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ String\u578b\u5909\u6570x\u306e\u5ba3\u8a00\u3068\u300c1\u65e5\u306f\u300d\u306e\u4ee3\u5165\r\n\t\tString x = \"1\u65e5\u306f\u3001\";\r\n\r\n\t\t\/\/ int\u578b\u5909\u6570y\u306e\u5ba3\u8a00\u306824\u306e\u4ee3\u5165\r\n\t\tint y = 24;\r\n\r\n\t\t\/\/ String\u578b\u5909\u6570z\u306e\u5ba3\u8a00\u3068\u300c\u6642\u9593\u300d\u306e\u4ee3\u5165\r\n\t\tString z = \"\u6642\u9593\";\r\n\r\n\t\t\/\/ \u5909\u6570x\u3068y\u3068z\u3092\u9023\u7d50\u3057\u3066\u3001\u300c1\u65e5\u306f24\u6642\u9593\u300d\u3092\u51fa\u529b\r\n\t\tSystem.out.println(x + y + z);\r\n\t}\r\n}<\/code><\/pre>\n<div class=\"Separator\">\n<div class=\"Separator__child\"><\/div>\n<\/div>\n<h3 class=\"Heading Title Title--m\" id=\"Bookmark-8\"><span class=\"Num\">8.<\/span>\u7df4\u7fd2\u554f\u984c2<\/h3>\n<p>\u6f14\u7b97\u3084\u6587\u5b57\u5217\u9023\u7d50\u306e\u7df4\u7fd2\u554f\u984c\u3067\u3059\u3002<\/p>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-8-1\"><span class=\"Num\">8.1.<\/span>\u554f\u984c1<\/h4>\n<p>int\u578b\u306e\u5909\u6570x\u3068y\u3092\u5ba3\u8a00\u3057\u3001x\u306b200\u3001y\u306b2\u3092\u4ee3\u5165\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nx\u3068y\u306e\u52a0\u7b97\u7d50\u679c\u3001\u6e1b\u7b97\u7d50\u679c\u3001\u4e57\u7b97\u7d50\u679c\u3001\u9664\u7b97\u7d50\u679c\u3001\u5270\u4f59\u7d50\u679c\u3092\u305d\u308c\u305e\u308c\u8a08\u7b97\u3057\u3001\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-9\"><label for=\"Answer-content-9\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai8_1.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a2\u3064\u306eint\u578b\u5909\u6570\u306e\u6f14\u7b97\u51e6\u7406\r\n *\/\r\npublic class Mondai8_1 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ int\u578b\u5909\u6570x\u3001y\u306e\u5ba3\u8a00\u3068\u5024\u306e\u4ee3\u5165\r\n\t\tint x = 200;\r\n\t\tint y = 2;\r\n\r\n\t\t\/\/ x\u3068y\u306e\u52a0\u7b97\u3001\u6e1b\u7b97\u3001\u4e57\u7b97\u3001\u9664\u7b97\u3001\u5270\u4f59\r\n\t\tint a = x + y;\r\n\t\tint b = x - y;\r\n\t\tint c = x * y;\r\n\t\tint d = x \/ y;\r\n\t\tint e = x % y;\r\n\r\n\t\t\/\/ \u305d\u308c\u305e\u308c\u306e\u6f14\u7b97\u7d50\u679c\u3092\u51fa\u529b\r\n\t\tSystem.out.println(a);\r\n\t\tSystem.out.println(b);\r\n\t\tSystem.out.println(c);\r\n\t\tSystem.out.println(d);\r\n\t\tSystem.out.println(e);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\tint\u578b\u5909\u6570x\u3001y\u3092\u5ba3\u8a00\u3057\u3001\u5024\u3092\u4ee3\u5165\u3057\u305f\u5f8c\u306b\u30012\u3064\u306e\u5909\u6570\u306e\u52a0\u7b97\u3001\u6e1b\u7b97\u3001\u4e57\u7b97\u3001\u9664\u7b97\u3001\u5270\u4f59\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\t\t\u8a08\u7b97\u7d50\u679c\u3092\u305d\u308c\u305e\u308cint\u578b\u5909\u6570a,b,c,d,e\u306b\u4ee3\u5165\u3057\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-8-2\"><span class=\"Num\">8.2.<\/span>\u554f\u984c2<\/h4>\n<p>int\u578b\u306e\u5909\u6570hensu1\u3068hensu2\u3092\u5ba3\u8a00\u3057\u3001hensu1\u3068hensu2\u306b\u305d\u308c\u305e\u308c200000\u3092\u4ee3\u5165\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nhensu1\u3068hensu2\u306e\u52a0\u7b97\u7d50\u679c\u3001\u6e1b\u7b97\u7d50\u679c\u3001\u4e57\u7b97\u7d50\u679c\u3001\u9664\u7b97\u7d50\u679c\u3001\u5270\u4f59\u7d50\u679c\u3092\u305d\u308c\u305e\u308c\u8a08\u7b97\u3057\u3001\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u203b\u4e57\u7b97\u7d50\u679c\u306f\u3001int\u578b\u304c\u6271\u3046\u6570\u5024\u306e\u7bc4\u56f2\u3092\u8d85\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3001long\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u8a08\u7b97\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-10\"><label for=\"Answer-content-10\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai8_2.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a2\u3064\u306eint\u578b\u5909\u6570\u306e\u6f14\u7b97\u51e6\u7406\r\n *\/\r\npublic class Mondai8_2 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ int\u578b\u5909\u6570\u306e\u5ba3\u8a00\u3068\u5024\u306e\u4ee3\u5165\r\n\t\tint hensu1 = 200000;\r\n\t\tint hensu2 = 200000;\r\n\r\n\t\t\/\/ hensu1\u3068hensu2\u306e\u52a0\u7b97\u3001\u6e1b\u7b97\u3001\u4e57\u7b97\u3001\u9664\u7b97\u3001\u5270\u4f59\r\n\t\tint a = hensu1 + hensu2;\r\n\t\tint b = hensu1 - hensu2;\r\n\t\tlong c = (long) hensu1 * hensu2;\r\n\t\tint d = hensu1 \/ hensu2;\r\n\t\tint e = hensu1 % hensu2;\r\n\r\n\t\t\/\/ \u305d\u308c\u305e\u308c\u306e\u6f14\u7b97\u7d50\u679c\u3092\u51fa\u529b\r\n\t\tSystem.out.println(a);\r\n\t\tSystem.out.println(b);\r\n\t\tSystem.out.println(c);\r\n\t\tSystem.out.println(d);\r\n\t\tSystem.out.println(e);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\tint\u578b\u5909\u6570hensu1\u3001hensu2\u3092\u5ba3\u8a00\u3057\u3001\u5024\u3092\u4ee3\u5165\u3057\u305f\u5f8c\u306b\u30012\u3064\u306e\u5909\u6570\u306e\u52a0\u7b97\u3001\u6e1b\u7b97\u3001\u4e57\u7b97\u3001\u9664\u7b97\u3001\u5270\u4f59\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\t\thensu1\u3068hensu2\u306e\u4e57\u7b97\u7d50\u679c\u306f\u3001int\u578b\u306e\u6570\u5024\u7bc4\u56f2\u3092\u8d85\u3048\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u8a08\u7b97\u7d50\u679c\u3092\u4ee3\u5165\u3059\u308b\u5909\u6570c\u306f\u3001long\u578b\u3067\u5b9a\u7fa9\u3057\u307e\u3059\u3002<br \/>\n\t\t\u307e\u305f\u30012\u3064\u306eint\u578b\u306e\u5909\u6570\u306e\u6f14\u7b97\u306e\u5834\u5408\u3001\u8a08\u7b97\u7d50\u679c\u3082int\u578b\u3068\u3057\u3066\u51e6\u7406\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u4e57\u7b97\u3092\u884c\u3063\u305f\u7d50\u679c\u304cint\u578b\u306e\u6570\u5024\u7bc4\u56f2\u3092\u8d85\u3048\u308b\u5834\u5408\u3001\u5185\u90e8\u7684\u306b\u6841\u3042\u3075\u308c\u304c\u767a\u751f\u3057\u307e\u3059\u3002<br \/>\n\t\t\u6841\u3042\u3075\u308c\u3068\u306f\u3001\u6271\u3048\u308b\u6570\u5024\u7bc4\u56f2\u306e\u6700\u5927\u5024\u3092\u8d85\u3048\u3066\u3057\u307e\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\t\t\u6b63\u3057\u304f\u4e57\u7b97\u7d50\u679c\u3092\u5f97\u308b\u305f\u3081\u306b\u306f\u3001hensu1\u304bhensu2\u3092long\u578b\u3078\u578b\u5909\u63db\uff08\u30ad\u30e3\u30b9\u30c8\uff09\u3057\u3066\u8a08\u7b97\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\n\t\tint\u578b\u306e\u5909\u6570\u3068long\u578b\u306e\u5909\u6570\u306e\u6f14\u7b97\u306e\u5834\u5408\u3001\u6570\u5024\u7bc4\u56f2\u304c\u5927\u304d\u3044long\u578b\u306b\u5408\u308f\u305b\u3066\u8a08\u7b97\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u8a08\u7b97\u7d50\u679c\u3082\u6b63\u3057\u3044\u6570\u5024\u3068\u306a\u308a\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-8-3\"><span class=\"Num\">8.3.<\/span>\u554f\u984c3<\/h4>\n<p>int\u578b\u306e\u5909\u6570age\u3092\u5ba3\u8a00\u3057\u300120\u3092\u4ee3\u5165\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u5909\u6570age\u3092\u4f7f\u7528\u3057\u3066\u3001\u300c\u79c1\u306e\u5e74\u9f62\u306f\u300120\u6b73\u3067\u3059\u3002\u300d\u3068\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u305d\u306e\u3042\u3068\u3001\u5909\u6570age\u3092\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u3057\u3001\u300c\u660e\u65e5\u300121\u6b73\u306b\u306a\u308a\u307e\u3059\u3002\u300d\u3068\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u203b\u6587\u5b57\u5217\u306e\u9023\u7d50\u51e6\u7406\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-11\"><label for=\"Answer-content-11\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai8_3.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a\u6587\u5b57\u5217\u9023\u7d50\u51e6\u7406\r\n *\/\r\npublic class Mondai8_3 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ int\u578b\u5909\u6570age\u306e\u5ba3\u8a00\u3068\u5024\u306e\u4ee3\u5165\r\n\t\tint age = 20;\r\n\r\n\t\t\/\/ \u5909\u6570age\u3068\u6587\u5b57\u5217\u3092\u9023\u7d50\u3057\u3066\u51fa\u529b\r\n\t\tSystem.out.println(\"\u79c1\u306e\u5e74\u9f62\u306f\u3001\" + age + \"\u6b73\u3067\u3059\u3002\");\r\n\r\n\t\t\/\/ \u5909\u6570age\u306e\u5024\u306b1\u3092\u52a0\u7b97\r\n\t\tage++;\r\n\r\n\t\t\/\/ \u5909\u6570age\u3068\u6587\u5b57\u5217\u3092\u9023\u7d50\u3057\u3066\u51fa\u529b\r\n\t\tSystem.out.println(\"\u660e\u65e5\u3001\" + age + \"\u6b73\u306b\u306a\u308a\u307e\u3059\u3002\");\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\t\u6587\u5b57\u5217\u9023\u7d50\u306e\u554f\u984c\u3067\u3059\u3002<br \/>\n\t\tint\u578b\u5909\u6570age\u306e\u502420\u3068\u6587\u5b57\u5217\u3092\u300c&#43;\u300d\u3092\u4f7f\u3063\u3066\u9023\u7d50\u3057\u3001\u300c\u79c1\u306e\u5e74\u9f62\u306f\u300120\u6b73\u3067\u3059\u3002\u300d\u3068\u51fa\u529b\u3057\u307e\u3059\u3002<br \/>\n\t\t\u305d\u306e\u5f8c\u3001\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u3066\u5909\u6570age\u306e\u5024\u30921\u5897\u52a0\u3055\u305b\u3001\u518d\u5ea6\u6587\u5b57\u5217\u9023\u7d50\u3092\u3057\u306a\u304c\u3089\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-8-4\"><span class=\"Num\">8.4.<\/span>\u554f\u984c4<\/h4>\n<p>int\u578b\u5909\u6570a\u3092\u5ba3\u8a00\u3057\u3066\u30011\u3092\u4ee3\u5165\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u305d\u306e\u3042\u3068\u306b\u3001\u300c<code>System.out.println(a&#43;&#43;);<\/code>\u300d\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u305d\u306e\u3042\u3068\u306b\u3001\u300c<code>System.out.println(&#43;&#43;a);<\/code>\u300d\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u300c&#43;&#43;(\u30d7\u30e9\u30b9\u30d7\u30e9\u30b9)\u300d\u304c\u5909\u6570\u306e\u524d\u306b\u3042\u308b\u304b\u3001\u5f8c\u306b\u3042\u308b\u304b\u306b\u3088\u3063\u3066\u3001\u51e6\u7406\u7d50\u679c\u304c\u7570\u306a\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-12\"><label for=\"Answer-content-12\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai8_4.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u6f14\u7b97\u5b50\u51e6\u7406\r\n *\/\r\npublic class Mondai8_4 {\r\n\r\n\tpublic static void main(String[] args) {\r\n\r\n\t\t\/\/ int\u578b\u5909\u6570a\u306e\u5ba3\u8a00\u3068\u5024\u306e\u4ee3\u5165\r\n\t\tint a = 1;\r\n\r\n\t\t\/\/ a\u306e\u50241\u3092\u51fa\u529b\u3057\u305f\u5f8c\u306b\u3001a\u306e\u5024\u306b1\u3092\u52a0\u7b97\r\n\t\tSystem.out.println(a++);\r\n\r\n\t\t\/\/ a\u306e\u50242\u306b1\u52a0\u7b97\u3057\u305f\u5f8c\u306b\u3001a\u306e\u50243\u3092\u51fa\u529b\r\n\t\tSystem.out.println(++a);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\t\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u6f14\u7b97\u5b50\u306f\u3001\u5909\u6570\u306e\u5024\u30921\u3064\u5897\u3084\u3059\u3068\u3044\u3046\u51e6\u7406\u3092\u884c\u3046\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<br \/>\n\t\t\u3053\u306e\u554f\u984c\u306e\u3088\u3046\u306bSystem.out.println\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u51e6\u7406\u3059\u308b\u5834\u5408\u3001\u300c&#43;&#43;\u300d\u304c\u5909\u6570\u306e\u5f8c\u306b\u3042\u308b\u5834\u5408\u3068\u524d\u306b\u3042\u308b\u5834\u5408\u3067\u51fa\u529b\u51e6\u7406\u3068\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u306e\u51e6\u7406\u306e\u9806\u756a\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\t\t\u5909\u6570\u306e\u5f8c\u306b\u3042\u308b\u5834\u5408\u3001\u51fa\u529b\u306e\u51e6\u7406\u304c\u5148\u306b\u884c\u308f\u308c\u3001\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u306e\u51e6\u7406\u304c\u5f8c\u306b\u884c\u308f\u308c\u307e\u3059\u3002<br \/>\n\t\t\u5909\u6570\u306e\u524d\u306b\u3042\u308b\u5834\u5408\u3001\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u306e\u51e6\u7406\u304c\u5148\u306b\u884c\u308f\u308c\u3001\u51fa\u529b\u306e\u51e6\u7406\u304c\u5f8c\u306b\u884c\u308f\u308c\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<h4 class=\"Heading Title Title--s\" id=\"Bookmark-8-5\"><span class=\"Num\">8.5.<\/span>\u554f\u984c5<\/h4>\n<p>int\u578b\u5909\u6570age1\u3068age2\u3092\u5ba3\u8a00\u3057\u3001age1\u306b20\u3001age2\u306b25\u3092\u4ee3\u5165\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u95a2\u4fc2\u6f14\u7b97\u5b50\u300c!=\u300d\u3092\u4f7f\u7528\u3057\u3066\u3001age1\u3068age2\u3092\u6bd4\u8f03\u3057\u305f\u7d50\u679c\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u305d\u306e\u3042\u3068\u306b\u3001age1\u306b25\u3092\u4ee3\u5165\u3057\u3001\u95a2\u4fc2\u6f14\u7b97\u5b50\u300c!=\u300d\u3092\u4f7f\u7528\u3057\u3066\u3001age1\u3068age2\u3092\u6bd4\u8f03\u3057\u305f\u7d50\u679c\u3092\u753b\u9762\u306b\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"Answer-block\">\n\t<input class=\"SW\" type=\"checkbox\" id=\"Answer-content-13\"><label for=\"Answer-content-13\" class=\"Answer-SW\"><span\n\t\t\tclass=\"Google-icon Google-icon--arrow-single-gray\"><\/span>\u89e3\u7b54\u3092\u8868\u793a\u3059\u308b<\/label><\/p>\n<div class=\"Answer-content\">\n<div class=\"Pre-title\">Mondai8_5.java<\/div>\n<pre class=\"Copy prettyprint lang-js\"><code>\/**\r\n * \u51e6\u7406\u6982\u8981\uff1a\u95a2\u4fc2\u6f14\u7b97\u5b50\u51e6\u7406\r\n *\/\r\npublic class Mondai8_5 {\r\n\tpublic static void main(String[] args) {\r\n\t\t\/\/ int\u578b\u5909\u6570age1,age2\u306e\u5ba3\u8a00\u3068\u5024\u306e\u4ee3\u5165\r\n\t\tint age1 = 20;\r\n\t\tint age2 = 25;\r\n\r\n\t\t\/\/ \u6bd4\u8f03\u7d50\u679c\u3092\u51fa\u529b(\u7d50\u679c\u306ftrue)\r\n\t\tSystem.out.println(age1 != age2);\r\n\r\n\t\t\/\/ age1\u306b\u5024\u3092\u518d\u4ee3\u5165\r\n\t\tage1 = 25;\r\n\r\n\t\t\/\/ \u6bd4\u8f03\u7d50\u679c\u3092\u51fa\u529b(\u7d50\u679c\u306ffalse)\r\n\t\tSystem.out.println(age1 != age2);\r\n\t}\r\n}<\/code><\/pre>\n<p>\t\t\u95a2\u4fc2\u6f14\u7b97\u5b50\u300c!=\u300d\u3092\u4f7f\u7528\u3057\u3066\u30012\u3064\u306e\u5909\u6570\u306e\u5024\u3092\u6bd4\u8f03\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\t\t\u6bd4\u8f03\u3057\u305f\u7d50\u679c\u306f\u3001boolean\u578b\u306etrue\u304bfalse\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\t\t\u300c!=\u300d\u306f\u3001\u300c\u5de6\u8fba\u3068\u53f3\u8fba\u306f\u7b49\u3057\u304f\u306a\u3044\u304b\u300d\u3068\u3044\u3046\u610f\u5473\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u6700\u521d\u306e\u6bd4\u8f03\u7d50\u679c\u306f\u3001true\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\t\t\u305d\u306e\u3042\u3068\u3001age1\u3068age2\u306e\u5024\u3092\u540c\u3058\u306b\u3059\u308b\u3068\u3001\u6bd4\u8f03\u7d50\u679c\u304cfalse\u306b\u306a\u308a\u307e\u3059\u3002\n\t<\/p><\/div>\n<\/div>\n<div class=\"Information-block\">\n<div class=\"Information-heading\">\n<div class=\"Google-icon Google-icon--information\"><\/div>\n<div class=\"Information-heading__child\">Information<\/div>\n<\/p><\/div>\n<div class=\"Heading Title Title--xs\">0\u9664\u7b97\u30a8\u30e9\u30fc<\/div>\n<p>\t\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e16\u754c\u3067\u306f\u3001\u901a\u5e38\u3001\u5024\u30920\u3067\u5272\u308b\u300c0\u9664\u7b97\u300d\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<br \/>\n\tJava\u3067\u3082\u3001\u5c0f\u6570\u578b\u306e\u5024\u306e0\u9664\u7b97\u306f\u6b63\u5e38\u306b\u51e6\u7406\u3055\u308c\u307e\u3059\u304c\u3001\u6574\u6570\u578b\u306e\u5024\u306e0\u9664\u7b97\u3092\u884c\u3046\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u306e\u3067\u3001\u5272\u308a\u7b97\u3092\u884c\u3046\u3068\u304d\u306b\u306f\u6c17\u3092\u3064\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\t\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u3066\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"Copy prettyprint lang-js\"><code>public class MyInfinity {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tint x = 10;\r\n\t\tint y = 0;\r\n\r\n\t\t\/\/ 0\u9664\u7b97\r\n\t\tint z = x \/ y; \/\/ \u3053\u3053\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002\r\n\r\n\t\tSystem.out.println(z); \/\/ \u5b9f\u884c\u3055\u308c\u307e\u305b\u3093\u3002\r\n\t}\r\n}<\/code><\/pre>\n<p>\t0\u9664\u7b97\u3092\u884c\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u4e0a\u306b\u3082\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u7570\u5e38\u7d42\u4e86\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br \/>\n\t\u3053\u306e\u307e\u307e\u3067\u306f\u3001\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u6b63\u5e38\u306b\u51e6\u7406\u3055\u308c\u307e\u305b\u3093\u306e\u3067\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e2d\u3067\u4f55\u3089\u304b\u306e\u5bfe\u51e6\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\t\u5bfe\u51e6\u65b9\u6cd5\u306f\u3001\u4eca\u5f8c\u306e\u7ae0\u3067\u5b66\u7fd2\u3057\u307e\u3059\u306e\u3067\u3001\u307e\u305a\u306f\u30010\u9664\u7b97\u30a8\u30e9\u30fc\u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u77e5\u3063\u3066\u304a\u304f\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\t\u305d\u306e\u4ed6\u306b\u3082\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u5b9f\u884c\u6642\u306b\u767a\u751f\u3059\u308b\u30a8\u30e9\u30fc\u304c\u591a\u6570\u5b58\u5728\u3057\u307e\u3059\u3002<br \/>\n\t\u3044\u308f\u3086\u308b\u300c\u30d0\u30b0\u300d\u3068\u547c\u3070\u308c\u308b\u30a8\u30e9\u30fc\u3067\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306b\u306f\u30d0\u30b0\u306e\u306a\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u4ed5\u4e0a\u3052\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n<\/p><\/div>\n<p><a href=\"https:\/\/techfun.cc\/java-base\/java_base_basic_java_2.html\" class=\"Post-link\">Java\u306e\u57fa\u672c\uff08\u5f8c\u7de8\uff09\u306f\u3053\u3061\u3089<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u672c\u7ae0\u3067\u306e\u5b66\u7fd2\u9805\u76ee Java\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8a18\u8ff0\u3059\u308b\u4e0a\u3067\u6700\u4f4e\u9650\u5fc5\u8981\u306a\u57fa\u672c\u30eb\u30fc\u30eb\u3068\u57fa\u672c\u6587\u6cd5\u3092\u5b66\u7fd2\u3059\u308b\u300cJava\u306e\u57fa\u672c\u300d\u306e\u524d\u7de8\u3067\u3059\u3002 \u524d\u7de8\u3067\u306f\u3001\u69cb\u6587\u30eb\u30fc\u30eb\u3084\u30c7\u30fc\u30bf\u578b\u3001\u6f14\u7b97\u5b50\u306a\u3069\u3092\u6271\u3044\u307e\u3059\u3002 \u6761\u4ef6\u51e6\u7406\u3084\u7e70\u308a\u8fd4\u3057\u3092\u6271\u3046\u5f8c\u7de8\u306f\u3053\u3061\u3089\u2026<\/p>\n","protected":false},"author":5,"featured_media":5998,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"class_list":["post-159","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java-base"],"acf":{"chapter":3,"javabase_order":4,"list-display_description":"Java\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8a18\u8ff0\u3059\u308b\u4e0a\u3067\u6700\u4f4e\u9650\u5fc5\u8981\u306a\u57fa\u672c\u30eb\u30fc\u30eb\u3068\u57fa\u672c\u6587\u6cd5\u3092\u5b66\u7fd2\u3059\u308b\u57fa\u672c\u8b1b\u5ea7\u306e\u524d\u7de8\u3067\u3059\u3002"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/posts\/159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/comments?post=159"}],"version-history":[{"count":33,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":6491,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/posts\/159\/revisions\/6491"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/media\/5998"}],"wp:attachment":[{"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/media?parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/categories?post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}