Content deleted Content added
No edit summary |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 1:
{{WikiProject
{{WikiProject Java|importance=low}}
}}
== Structure section needs a lot of work ==
Line 57 ⟶ 58:
was needed, a standard compiler will never do so as there are instructions (bipush and sipush) for using small integer values directly without the need for a constant pool entry at all.
Since the Java bytecode makes no difference between these integral types, all int values fitting into the short value range are encoded this way. Only values outside this range or needed for initializing compile-time constants (e.g. static final fields) will end up in the constant pool. <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/77.188.94.56|77.188.94.56]] ([[User talk:77.188.94.56|talk]]) 15:56, 22 February 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
: Indeed, byte, short, and smaller char constant values used in the code will never appear in the constant pool (and maybe this is worth mentioning in the article). But for other uses of constant pool entries, e.g. the compile-time values of static final variables, these types require an int entry. There is another difference between the general class file format and the byte code instructions: as the article states, there’s no padding in the class file format, but within byte code instructions there is an exception to this rule regarding the two switch instructions as their tables are aligned. [[Special:Contributions/77.12.173.11|77.12.173.11]] ([[User talk:77.12.173.11|talk]]) <span style="font-size: smaller;" class="autosigned"> — Preceding [[Wikipedia:Signatures|undated]] comment added 09:40, 16 April 2014 (UTC)</span><!--Template:Undated--> <!--Autosigned by SineBot-->
::without jdk why we cant run the java programm in comand promnt [[Special:Contributions/119.235.54.130|119.235.54.130]] ([[User talk:119.235.54.130|talk]]) 09:17, 3 April 2024 (UTC)
|