0x
| 日本語 | ゼロエックス |
| 英語 | zero x |
| ふりがな | ぜろえっくす |
| フリガナ | ゼロエックス |
// Sample.java
public class Sample
{
public static void main( String[] args )
{
// 整数リテラルを16進数で表記するときには、頭に0xを付けます。
// 中に格納したら16進数も10進数も関係なくなるので注意。
// というか実際には2進数で格納されています。
int i = 0xA;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// a
// 10
// A~Fは小文字のa~fでも使えます。
i = 0xc;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// c
// 12
// 0xではなく0Xでも使えます。
i = 0Xd;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// d
// 13
// A~F以外の文字を使用することはできません。
// i = 0xG;
// コンパイルエラー:
// 16 進数のリテラル番号が無効です。
}
}
public class Sample
{
public static void main( String[] args )
{
// 整数リテラルを16進数で表記するときには、頭に0xを付けます。
// 中に格納したら16進数も10進数も関係なくなるので注意。
// というか実際には2進数で格納されています。
int i = 0xA;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// a
// 10
// A~Fは小文字のa~fでも使えます。
i = 0xc;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// c
// 12
// 0xではなく0Xでも使えます。
i = 0Xd;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// d
// 13
// A~F以外の文字を使用することはできません。
// i = 0xG;
// コンパイルエラー:
// 16 進数のリテラル番号が無効です。
}
}
// Sample.java
public class Sample
{
public static void main( String[] args )
{
// 整数リテラルを16進数で表記するときには、頭に0xを付けます。
// 中に格納したら16進数も10進数も関係なくなるので注意。
// というか実際には2進数で格納されています。
int i = 0xA;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// a
// 10
// A~Fは小文字のa~fでも使えます。
i = 0xc;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// c
// 12
// 0xではなく0Xでも使えます。
i = 0Xd;
System.out.println( Integer.toHexString( i ) );
System.out.println( i );
// d
// 13
// A~F以外の文字を使用することはできません。
// i = 0xG;
// コンパイルエラー:
// 16 進数のリテラル番号が無効です。
}
}
「みだし」に含まれているページ
「解説」に含まれているページ
- 0x
- 0X
- 16進数
- \
- \"
- \'
- \\
- \n
- \r
- \t
- \u
- ASCII
- ByteArrayInputStream
- ByteArrayOutputStream
- CharArrayReader
- CharArrayWriter
- CP932
- EUC
- FileOutputStream
- InputStream
- ISO-2022-JP
- NaN
- OutputStream
- StringReader
- StringWriter
- UTF-8
- 「-」
- 「~」
- 〓
- エンコード
- コード
- シフトJIS
- スペース
- タブ文字
- バイト入力ストリーム
- バイト出力ストリーム
- 丸数字
- 全角スペース
- 制御コード
- 半角カタカナ
- 大文字
- 実体参照
- 小文字
- 整数リテラル
- 文字
- 文字エンコーディング
- 文字コード
- 文字セット
- 文字入力ストリーム
- 文字化け
- 無限大
「サンプルプログラムとか」に含まれているページ
- &=演算子
- &演算子
- 0x
- 0X
- 16進数
- <<=演算子
- >>=演算子
- >>>=演算子
- \
- ^=演算子
- ^演算子
- ASCII
- BufferedInputStream
- BufferedOutputStream
- BufferedWriter
- ByteArrayInputStream
- ByteArrayOutputStream
- char
- CP932
- DataInputStream
- DataOutputStream
- EUC
- EUC-JP
- FileInputStream
- FileOutputStream
- FileReader
- FilterInputStream
- FilterOutputStream
- FilterReader
- IANA
- InputStream
- InputStreamReader
- ISO-10646-UCS-2
- ISO-2022-JP
- ISO-8859-1
- JTree
- LineNumberInputStream
- NaN
- ObjectInputStream
- ObjectOutputStream
- OutputStreamWriter
- PipedInputStream
- PipedOutputStream
- PipedReader
- PipedWriter
- PrintStream
- PrintWriter
- PushbackInputStream
- SequenceInputStream
- Shift_JIS
- StringBufferInputStream
- UCS-2
- Unicode
- US-ASCII
- UTF-8
- Windows-31J
- |=演算子
- |演算子
- 「-」
- 「~」
- エイリアス
- コード
- シフトJIS
- ダンプ
- ビットフラグ
- ブロックします
- プレフィックス
- 丸数字
- 制御コード
- 改行文字
- 整数リテラル
- 文字
- 文字コード
- 文字化け
- 無限大
- 符号




