Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Java 17 Programming

You're reading from   Learn Java 17 Programming Learn the fundamentals of Java Programming with this updated guide with the latest features

Arrow left icon
Product type Paperback
Published in Jul 2022
Publisher Packt
ISBN-13 9781803241432
Length 748 pages
Edition 2nd 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 (23) Chapters Close

Preface 1. Part 1: Overview of Java Programming
2. Chapter 1: Getting Started with Java 17 FREE CHAPTER 3. Chapter 2: Java Object-Oriented Programming (OOP) 4. Chapter 3: Java Fundamentals 5. Part 2: Building Blocks of Java
6. Chapter 4: Exception Handling 7. Chapter 5: Strings, Input/Output,and Files 8. Chapter 6: Data Structures, Generics, and Popular Utilities 9. Chapter 7: Java Standard and External Libraries 10. Chapter 8: Multithreading and Concurrent Processing 11. Chapter 9: JVM Structure and Garbage Collection 12. Chapter 10: Managing Data in a Database 13. Chapter 11: Network Programming 14. Chapter 12: Java GUI Programming 15. Part 3: Advanced Java
16. Chapter 13: Functional Programming 17. Chapter 14: Java Standard Streams 18. Chapter 15: Reactive Programming 19. Chapter 16: Java Microbenchmark Harness 20. Chapter 17: Best Practices for Writing High-Quality Code 21. Assessments 22. Other Books You May Enjoy

Chapter 16 – Java Microbenchmark Harness

  1. b), c), d)
  2. Add a dependency on JMH to the project (or classpath, if run manually) and add the annotation @Benchmark to the method you would like to test for performance
  3. As the main method using a Java command with an explicitly named main class, as the main method using a java command with an executable .jar file, and using an IDE running as the main method or using a plugin and running an individual method
  4. Any two of the following: Mode.AverageTime, Mode.Throughput, Mode.SampleTime, and Mode.SingleShotTime
  5. Any two of the following: TimeUnit.NANOSECONDS, TimeUnit.MICROSECONDS, TimeUnit.MILLISECONDS, TimeUnit.SECONDS, TimeUnit.MINUTES, TimeUnit.HOURS, and TimeUnit.DAYS
  6. Using an object of a class with the annotation @State
  7. Using the annotation @Param in front of the state property
  8. Using the annotation @CompilerConrol
  9. Using a parameter of the type Blackhole that consumes the produced result
  10. Using...
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 $19.99/month. Cancel anytime
Banner background image