Entries from 2020-02-01 to 1 month
C言語から入るとatoiって言えば大体伝わると思ってたけどJavaから入ればまーそうならないっぽい。 String to int String numberAsString = "100"; Int number = Integer.parseInt(numberAsString); System.out.println(number); とやればInt型の100になりま…
下記をコードの周りに挿入するだけ <div class="code-title" data-title="xxx.java"> /* code is written here */ </div>
まー特に書くことないか?って思ってたけど一応SwitchがString型でもできるらしいのでメモしておく JDK7から使える あとは、byte, short, int, charが使えます。 public class Main { public static void main(String[] args) { char c = 'z'; switch(c) { c…