---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 12 Edition"
java_version: 12
chapter: "Chapter 2. The Structure of the Java Virtual Machine"
section: "2.11.5"
heading: "2.11.5. Object Creation and Manipulation"
parent: "2.11. Instruction Set Summary"
source: https://docs.oracle.com/javase/specs/jvms/se12/html/jvms-2.html#jvms-2.11.5
id: "2.11.5"
url: https://jvm.obfuscated.software/jvms/se12/2.11.5.html
raw: https://jvm.obfuscated.software/jvms/se12/2.11.5.md
---

# 2.11.5. Object Creation and Manipulation

Although both class instances and arrays are objects, the Java Virtual Machine creates and manipulates class instances and arrays using distinct sets of instructions:

- Create a new class instance: *new*.
- Create a new array: *newarray*, *anewarray*, *multianewarray*.
- Access fields of classes (`static` fields, known as class variables) and fields of class instances (non-`static` fields, known as instance variables): *getstatic*, *putstatic*, *getfield*, *putfield*.
- Load an array component onto the operand stack: *baload*, *caload*, *saload*, *iaload*, *laload*, *faload*, *daload*, *aaload*.
- Store a value from the operand stack as an array component: *bastore*, *castore*, *sastore*, *iastore*, *lastore*, *fastore*, *dastore*, *aastore*.
- Get the length of array: *arraylength*.
- Check properties of class instances or arrays: *instanceof*, *checkcast*.
