Just to show how a class file looks, here is the output of the jdisco program. It shows all the fields in the class file. Each operand of an instruction is shown in hexadecimal form.
Reading from file example.class... magic_number: cafebabe minor_version: 3 major_version: 45 constant_pool_count: 76 constant_pool[1]: (CONSTANT_Class_info) tag: 7 name_index: 2 constant_pool[2]: (CONSTANT_Utf8_info) tag: 1 length: 16 string: java/lang/Object constant_pool[3]: (CONSTANT_Class_info) tag: 7 name_index: 4 constant_pool[4]: (CONSTANT_Utf8_info) tag: 1 length: 7 string: example constant_pool[5]: (CONSTANT_Methodref_info) tag: 10 class_index: 1 name_and_type_index: 6 constant_pool[6]: (CONSTANT_NameAndType_info) tag: 12 name_index: 7 descriptor_index: 8 constant_pool[7]: (CONSTANT_Utf8_info) tag: 1 length: 6 string: <init> constant_pool[8]: (CONSTANT_Utf8_info) tag: 1 length: 3 string: ()V constant_pool[9]: (CONSTANT_Utf8_info) tag: 1 length: 8 string: <clinit> constant_pool[10]: (CONSTANT_Utf8_info) tag: 1 length: 4 string: Code constant_pool[11]: (CONSTANT_Utf8_info) tag: 1 length: 13 string: ConstantValue constant_pool[12]: (CONSTANT_Utf8_info) tag: 1 length: 10 string: Exceptions constant_pool[13]: (CONSTANT_Class_info) tag: 7 name_index: 14 constant_pool[14]: (CONSTANT_Utf8_info) tag: 1 length: 9 string: pcrterror constant_pool[15]: (CONSTANT_Utf8_info) tag: 1 length: 14 string: ThrowFunResExc constant_pool[16]: (CONSTANT_Methodref_info) tag: 10 class_index: 13 name_and_type_index: 17 constant_pool[17]: (CONSTANT_NameAndType_info) tag: 12 name_index: 15 descriptor_index: 8 constant_pool[18]: (CONSTANT_Class_info) tag: 7 name_index: 19 constant_pool[19]: (CONSTANT_Utf8_info) tag: 1 length: 4 string: pcio constant_pool[20]: (CONSTANT_Utf8_info) tag: 1 length: 7 string: pcwrite constant_pool[21]: (CONSTANT_Utf8_info) tag: 1 length: 9 string: pcwriteln constant_pool[22]: (CONSTANT_Utf8_info) tag: 1 length: 4 string: (F)V constant_pool[23]: (CONSTANT_Utf8_info) tag: 1 length: 5 string: (FI)V constant_pool[24]: (CONSTANT_Utf8_info) tag: 1 length: 6 string: (FII)V constant_pool[25]: (CONSTANT_Utf8_info) tag: 1 length: 4 string: (Z)V constant_pool[26]: (CONSTANT_Utf8_info) tag: 1 length: 5 string: (ZI)V constant_pool[27]: (CONSTANT_Utf8_info) tag: 1 length: 4 string: (C)V constant_pool[28]: (CONSTANT_Utf8_info) tag: 1 length: 5 string: (CI)V constant_pool[29]: (CONSTANT_Utf8_info) tag: 1 length: 4 string: (I)V constant_pool[30]: (CONSTANT_Utf8_info) tag: 1 length: 5 string: (II)V constant_pool[31]: (CONSTANT_Utf8_info) tag: 1 length: 21 string: (Ljava/lang/String;)V constant_pool[32]: (CONSTANT_Utf8_info) tag: 1 length: 22 string: (Ljava/lang/String;I)V constant_pool[33]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 34 constant_pool[34]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 22 constant_pool[35]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 36 constant_pool[36]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 23 constant_pool[37]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 38 constant_pool[38]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 24 constant_pool[39]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 40 constant_pool[40]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 25 constant_pool[41]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 42 constant_pool[42]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 26 constant_pool[43]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 44 constant_pool[44]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 27 constant_pool[45]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 46 constant_pool[46]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 28 constant_pool[47]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 48 constant_pool[48]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 29 constant_pool[49]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 50 constant_pool[50]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 30 constant_pool[51]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 52 constant_pool[52]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 31 constant_pool[53]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 54 constant_pool[54]: (CONSTANT_NameAndType_info) tag: 12 name_index: 20 descriptor_index: 32 constant_pool[55]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 56 constant_pool[56]: (CONSTANT_NameAndType_info) tag: 12 name_index: 21 descriptor_index: 8 constant_pool[57]: (CONSTANT_Utf8_info) tag: 1 length: 9 string: pcread_fl constant_pool[58]: (CONSTANT_Utf8_info) tag: 1 length: 9 string: pcread_ch constant_pool[59]: (CONSTANT_Utf8_info) tag: 1 length: 10 string: pcread_int constant_pool[60]: (CONSTANT_Utf8_info) tag: 1 length: 8 string: pcreadln constant_pool[61]: (CONSTANT_Utf8_info) tag: 1 length: 3 string: ()F constant_pool[62]: (CONSTANT_Utf8_info) tag: 1 length: 3 string: ()I constant_pool[63]: (CONSTANT_Utf8_info) tag: 1 length: 3 string: ()I constant_pool[64]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 65 constant_pool[65]: (CONSTANT_NameAndType_info) tag: 12 name_index: 57 descriptor_index: 61 constant_pool[66]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 67 constant_pool[67]: (CONSTANT_NameAndType_info) tag: 12 name_index: 58 descriptor_index: 62 constant_pool[68]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 69 constant_pool[69]: (CONSTANT_NameAndType_info) tag: 12 name_index: 59 descriptor_index: 63 constant_pool[70]: (CONSTANT_Methodref_info) tag: 10 class_index: 18 name_and_type_index: 71 constant_pool[71]: (CONSTANT_NameAndType_info) tag: 12 name_index: 60 descriptor_index: 8 constant_pool[72]: (CONSTANT_Utf8_info) tag: 1 length: 4 string: main constant_pool[73]: (CONSTANT_Utf8_info) tag: 1 length: 22 string: ([Ljava/lang/String;)V constant_pool[74]: (CONSTANT_String_info) tag: 8 string_index: 75 constant_pool[75]: (CONSTANT_Utf8_info) tag: 1 length: 12 string: Hello, world acces_flags: <no flags> this_class: 3 super_class: 1 interfaces_count: 0 interfaces[]: <none> fields_count: 0 fields[]: <none> methods_count: 2 methods[0]: acces_flags: <no flags> name_index: 7 descriptor_index: 8 attributes_count: 1 attributes[0]: attribute_name_index: 10 (Code) attribute_length: 17 max_stack: 1 max_locals: 1 code_length: 5 code[]: 0 aload_0 1 invokespecial 00 05 4 return exception_table_length: 0 exception_table[]: <none> attributes_count: 0 attributes[]: <none> methods[1]: acces_flags: ACC_PUBLIC ACC_STATIC name_index: 72 descriptor_index: 73 attributes_count: 1 attributes[0]: attribute_name_index: 10 (Code) attribute_length: 21 max_stack: 2 max_locals: 1 code_length: 9 code[]: 0 ldc 4a 2 invokestatic 00 33 5 invokestatic 00 37 8 return exception_table_length: 0 exception_table[]: <none> attributes_count: 0 attributes[]: <none> attributes_count: 0 attributes[]: <none> Done, closing example.class...