longデータ型の値を任意の数値で初期化するハードウェア インターフェイス アプリケーションを 1 つ作成しています8 byte(ファイルで指定された固定キーであるためdll)。例:
long fixedKey=0123456701234567; //error on this line
Error is : The literal 0123456701234567 of type int is out of range
Primitive Data Types( Java API ) の範囲longは
-9,223,372,036,854,775,808 から 9,223,372,036,854,775,807 (19 桁の数字) です。明らかに、入力した数字 (16 桁の数字) はlongデータ型の範囲内にあるため、この種のエラーが発生するのはなぜですか。