今月はJavaのプログラムの中から,Javaファイルをコンパイルするために使用されるCompiler APIを取りあげます。 実をいうと,Compiler APIを使わずとも,プログラムの中でJavaコンパイラを使用することができます。これはJava SE 6以前のJavaでも可能です。 例えば ...
Given an array arr[] with non-negative integers representing the height of blocks. If the width of each block is 1, compute how much water can be trapped between the blocks during the rainy season.
There was an error while loading. Please reload this page.
前回は、11月9日に公開されたJSR 308:Annotations on Java TypesのEarly Draftを元に、同仕様の概要を紹介した。JSR 308については本連載第15回でも取り上げているが、その際、開発段階にある対応コンパイラを用いて型に対するアノテーションの適用例を紹介した。