プログラミング言語・実行環境の「Java」には、整数を扱うための仕組みとして「int」と「Integer」の2つがある。“字面”だけで判断して「intもIntegerも同じであり、intはIntegerの略に過ぎない」と考えてはいけない。intとIntegerは名称は似ているものの ...
プログラミング言語・実行環境の「Java」は、整数を扱うための仕組みを2つ備える。「int」と「Integer」の2つだ。intは「型」(数値や文字列といったデータの種類)、Integerは「クラス」(データと処理をまとめたオブジェクトの設計図)であり、こうした ...
変数が使用できる範囲は異なる。以下がその指標となる。 staticでクラス変数を宣言したもの。 プログラム終了まで有効 ...
Classes, fields, methods, constructors, and objects are the building blocks of object-based Java applications. This Java tutorial teaches you how to declare classes, describe attributes via fields, ...
何千人もの開発者が、InfoQのミニブック「Practical Guide to Building an API Back End with Spring Boot」から、Spring Bootを使ったREST API構築の基礎を学んだ。この本では、出版時に新しくリリースされたバージョンである Spring Boot 2 を使用している。しかし、Spring Boot3が最近 ...
Java interfaces are different from classes, and it’s important to know how to use their special properties in your Java programs. This tutorial introduces the difference between classes and interfaces ...
だから自動的にすべてのクラスは Object を継承している 「参照型」、「ラッパークラス」、「コレクション」、「自作クラス」は全てObject の「子クラス」となる 「左辺がObject」なら、「右辺は何でも」入れられる → 全部 Object を継承しているから。