Skip to main content

Java 10 Unique Features and What's new Java 10?

Java 10 was released in March 2018, It comes just six months after its predecessor i.e. Java 9 and brings an enhanced Local Variable Type Inference, garbage collection and compilation and other exciting features. It was an enhancement to the Java 9 and its a new polished version of Java 9 as It was not a major update but still it include the important features and modifications such as Native-Header Generation Tool (aka javah) is removed.
Java 8 to Java 9 it took 3 years and after 6 months of Java 9 Oracle released the Java 10. Java community announced its shift to a new 6 month cadence for Java. It moved to a Long Term Support (LTS) model for Oracle Java SE products.

What does LTS mean?
LTS version of the products will offer premier and sustained support from Oracle and it will be targeted every 3 years.

Java 10 features

1. Local-Variable Type Inference : 
Local-Variable Type Inference is the biggest new feature in Java 10. It adds type inference to declarations of local variables with initializers. Local type inference can be used only in the following scenarios:
  • Limited only to Local Variable with initializer
  • Indexes of enhanced for loop or indexes
  • Local declared in for loop
2. Consolidate the JDK Forest into a Single Repository 
3. Garbage-Collector Interface
Parallel Full GC for G1:
G1 garbage collector was made default in Java 9 (JDK 9). G1 Garbage collector avoids any full garbage collection, but when concurrent threads for collection cannot revive the memory fast enough users experience is impacted.
This change improves the G1 worst-case latency by making the full GC parallel. The mark-sweep-compact algorithm from G1 collector is parallelized as part of this change and will be triggered when concurrent threads for collection can’t revive the memory fast enough.
4. Application Class-Data Sharing : 
This feature helps in improving the startup footprint, extends the existing Class-Data Sharing (“CDS”) feature to allow application classes to be placed in the shared archive.
JVM while starting performs some preliminary steps, one of which is loading classes in memory. If there are several jars having multiple classes, then the lag in the first request is clearly visible. This becomes an issue with server less architecture, where boot time is critical. In order to bring down application startup time, Application class-data sharing can be used. The idea is to reduce footprint by sharing common class metadata across different Java processes. 
This can be achieved by following 3 steps:
1. Determining the classes to archive: Use the java launcher to create a list of files to archive, this can be achieved by following parameters:
$java -Xshare:off -XX:+UseAppCDS -XX:DumpLoadedClassList=hello.lst -cp hello.jar HelloWorld
2. Creating the AppCDS archive: Use java launcher to create the archive of the list of files to be used for Application CDS, this can be achieved by following parameters:
$java -Xshare:dump -XX:+UseAppCDS -XX:SharedClassListFile=hello.lst -XX:SharedArchiveFile=hello.jsa -cp hello.jar
3. Using the AppCDS archive: Use Java launcher with the following parameters to use Application CDS.
$java -Xshare:on -XX:+UseAppCDS -XX:SharedArchiveFile=hello.jsa -cp hello.jar HelloWorld

4. Thread-Local Handshakes
5. Remove the Native-Header Generation Tool (javah)
6. Additional Unicode Language-Tag Extensions
7. Heap Allocation on Alternative Memory Devices

8. Experimental Java-Based JIT Compiler : 

9. Root Certificates
10. Time-Based Release Versioning:
Oracle changed the version-string scheme of the Java SE Platform and the JDK, and related versioning information, for present and future time-based release models.
The new pattern of the Version number is:
$FEATURE. $INTERIM. $UPDATE. $PATCH


Comments

Top 5 Most Read Posts

Who is Peter Lynch and what is his philosophy in equity market investment? 25 Golden Rules of the most successful Fund Manager.

Peter Lynch (born January 19, 1944) is an American investor, mutual fund manager, and philanthropist. As the manager of the Magellan Fund at Fidelity Investments between 1977 and 1990, Lynch averaged a 29.2% annual return, consistently more than doubling the S&P 500 stock market index and making it the best-performing mutual fund in the world. During his 13 year tenure, assets under management increased from $18 million to $14 billion. He also co-authored a number of books and papers on investing and coined a number of well known mantras of modern individual investing strategies, such as Invest in what you know and ten bagger. Lynch is consistently described as a "legend" by the financial media for his performance record. Base on his career I have compiled his investing rules here. 25 GOLDEN RULES by @Peter Lynch 1: Nobody can predict interest rates, the future direction of the economy or the stock market. Dismiss all such forecasts & concentrate on what's actual...

What is version checking in Hibernate ?

Version checking used in hibernate when more then one thread trying to access same data. For example : User A edit the row of the TABLE for update ( In the User Interface changing data This is user thinking time) and in the same time User B edit the same record for update and click the update. Then User A click the Update and update done. Change made by user B is gone. In hibernate you can prevent slate object updation using version checking. Check the version of the row when you are updating the row. Get the version of the row when you are fetching the row of the TABLE for update. On the time of updation just fetch the version number and match with your version number (on the time of fetching).

What is wrong with HDFC securities? Are they doing some fraudulent activities or just causing issues with their platform as usually it don't work during market hours?

I have opened a DEMAT account with HDFC Securities in 2019 as HDFC group is well known for the customer services and I also hold a salary account with HDFC Bank, DEMAT account with the following conditions/offers as expressed by the executive. Trading Account Opening Charges (One Time) :  ₹999 (At that time it offered on lower price, I forget the exact price) Trading Annual Maintenance Charges AMC (Yearly Fee) : ₹0 Demat Account Opening Charges (One Time) : ₹0 Demat Account Annual Maintenance Charges AMC (Yearly Fee) : ₹750, nil if portfolio value below ₹2 lacs. Equity Delivery : 0.50% Equity Intraday : 0.05% Equity Futures : 0.05% Equity Options : ₹100 per lot or 1% of the premium (whichever is higher) Currency Futures : ₹23 per contract Currency Options : ₹20 per contract Commodity Futures : 0.02% for Intraday / 0.025% for positional Commodity Options : 0.02% for Intraday / 0.025% for positional It was going good but after 2-3 months I got to know that there are...

Fundamental Analysis : Asian Paints Ltd.

Asian Paints group is the largest paint manufacturer in India also engaged in the business of manufacturing of varnishes, enamels or lacquers, surfacing preparation, organic composite solvents and thinners. It operates in 15 countries and has 26 paint manufacturing facilities in the world serving consumers in over 60 countries. Besides Asian Paints, the group operates around the world through its various brands viz. Asian Paints Berger, Apco Coatings, SCIB Paints, Taubmans, Causeway Paints and Kadisco Asian Paints. It also manufactures metal sanitary ware such as bath, sinks, washbasins and similar articles. Recently introduced Lightings, Furnishings and Furniture thus adding more products in the Home décor and Interior Design category. Market Cap ₹ 244,763 Cr. Current Price ₹ 2,552 High / Low ₹ 2,873 / 1,483 Stock P/E 89.0 Book Value ₹ 115 Dividend Yield 0.47 % ROCE 33.8 % ROE 27.5 % Face Value ₹ 1.00 Price to book value 22.2 EPS ₹ 28.7 High price all time ₹ 2,873 Low price all time ₹...

What are JEE Containers? What are their different types?

Containers are the interface between a component and the low-level, platform-specific functionality that supports the component. Before it can be executed, a web, enterprise bean, or application client component must be assembled into a Java EE module and deployed into its container. The assembly process involves specifying container settings for each component in the Java EE application and for the Java EE application itself. Container settings customize the underlying support provided by the Java EE server, including such services as security, transaction management, Java Naming and Directory Interface (JNDI) API lookups, and remote connectivity. Here are some of the highlights. The Java EE security model lets you configure a web component or enterprise bean so that system resources are accessed only by authorized users. The Java EE transaction model lets you specify relationships among methods that make up a single transaction so that all methods in one transaction are treated as a ...