Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Introduction to Programming

You're reading from   Introduction to Programming Learn to program in Java with data structures, algorithms, and logic

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788839129
Length 722 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Nick Samoylov Nick Samoylov
Author Profile Icon Nick Samoylov
Nick Samoylov
Arrow right icon
View More author details
Toc

Table of Contents (27) Chapters Close

Title Page
Copyright and Credits
Dedication
Contributors
Packt Upsell
Preface
1. Java Virtual Machine (JVM) on Your Computer FREE CHAPTER 2. Java Language Basics 3. Your Development Environment Setup 4. Your First Java Project 5. Java Language Elements and Types 6. Interfaces, Classes, and Object Construction 7. Packages and Accessibility (Visibility) 8. Object-Oriented Design (OOD) Principles 9. Operators, Expressions, and Statements 10. Control Flow Statements 11. JVM Processes and Garbage Collection 12. Java Standard and External Libraries 13. Java Collections 14. Managing Collections and Arrays 15. Managing Objects, Strings, Time, and Random Numbers 16. Database Programming 17. Lambda Expressions and Functional Programming 18. Streams and Pipelines 19. Reactive Systems 1. Other Books You May Enjoy Index

JVM architecture


JVM architecture can be described in terms of the runtime data structure in the memory and in terms of the two subsystems that use the runtime data – the classloader and execution engine.

Runtime data areas

Each of the runtime data areas of JVM memory belong to one of two categories:

  • Shared areas, which include the following:
    • Method area: Class metadata, static fields, methods bytecodes
    • Heap area: Objects (state)
  • Not shared areas, dedicated to each application thread, which include the following:
    • Java stack: Current and caller frames, each frame keeping the state of Java (not native) method invocation:
      • Values of local variables
      • Method parameters values
      • Values of operands for intermediate calculations (operand stack)
      • Method return value (if any)
    • Program Counter (PC) register: Next instruction to execute
    • Native method stack: The state of native method invocations

We have already discussed that a programmer has to be careful while using reference types to not modify the object itself...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images