Java 9 was released in September 2017 and introduced several new features including JShell (an interactive shell), Java Platform Module System (JPMS) to address issues like classpath conflicts, Jlink to create custom runtime images, HTTP/2 client API, private methods in interfaces, and enhancements to streams, try-with-resources, and the G1 garbage collector which became the default. It focused on improving performance, security, and making Java code easier to maintain and deploy across different platforms.
Java history, versions, types of errors and exception, quiz SAurabh PRajapati
this ppt contains history and basic facts of object oriented programming language java, difference between JIT, JVM, JRE and JDK. it also having information about different versions of java. advantages over other language, difference between error and exception with its types is also included. explanation of final variable and string to int conversation is also added. in the end some twisted question of it which sharpen the knowledge of its basic are added. beyond this some programming examples with output is there too. hope u find it useful...!! thanku..!!
A quick introduction about everything that's new in Java 11. Includes API changes, language changes and new tools in the JDK.
Demo's for this presentation can be found here: https://github.com/MichelSchudel/java11demo
Groovy's AST Transformation is a compile time meta-programming technique and allows developer to hook into compilation process and add new fields or methods, or modify existing methods.
This session, delivered at Devoxx Poland, covers all the major changes to the Java platform between JDK 12 and JDK 17. All language features are covered, as well as many of the important API changes.
Introduction to Groovy runtime metaprogramming and AST transformsMarcin Grzejszczak
Introduction to Groovy runtime metaprogramming and AST transforms - by Marcin Grzejszczak author of the http://toomuchcoding.blogspot.com blog.
The sources can be found here
Mercurial Bitbucket - https://bitbucket.org/gregorin1987/too-much-coding/src/e5ab7c69ab7b2796075fd6f087fbf31346aa2d2b/Groovy/ast/?at=default
Git Github - https://github.com/marcingrzejszczak/too-much-coding/tree/master/Groovy/ast
Java history, versions, types of errors and exception, quiz SAurabh PRajapati
this ppt contains history and basic facts of object oriented programming language java, difference between JIT, JVM, JRE and JDK. it also having information about different versions of java. advantages over other language, difference between error and exception with its types is also included. explanation of final variable and string to int conversation is also added. in the end some twisted question of it which sharpen the knowledge of its basic are added. beyond this some programming examples with output is there too. hope u find it useful...!! thanku..!!
A quick introduction about everything that's new in Java 11. Includes API changes, language changes and new tools in the JDK.
Demo's for this presentation can be found here: https://github.com/MichelSchudel/java11demo
Groovy's AST Transformation is a compile time meta-programming technique and allows developer to hook into compilation process and add new fields or methods, or modify existing methods.
This session, delivered at Devoxx Poland, covers all the major changes to the Java platform between JDK 12 and JDK 17. All language features are covered, as well as many of the important API changes.
Introduction to Groovy runtime metaprogramming and AST transformsMarcin Grzejszczak
Introduction to Groovy runtime metaprogramming and AST transforms - by Marcin Grzejszczak author of the http://toomuchcoding.blogspot.com blog.
The sources can be found here
Mercurial Bitbucket - https://bitbucket.org/gregorin1987/too-much-coding/src/e5ab7c69ab7b2796075fd6f087fbf31346aa2d2b/Groovy/ast/?at=default
Git Github - https://github.com/marcingrzejszczak/too-much-coding/tree/master/Groovy/ast
Java is Object Oriented Programming. Java 8 is the latest version of the Java which is used by many companies for the development in many areas. Mobile, Web, Standalone applications.
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
A introductory slides for those who want to learn and know some basics of Java.Also for those persons who want to compare coding difference between Java and .net
At first glance, writing concurrent programs in Java seems like a straight-forward task. But the devil is in the detail. Fortunately, these details are strictly regulated by the Java memory model which, roughly speaking, decides what values a program can observe for a field at any given time. Without respecting the memory model, a Java program might behave erratic and yield bugs that only occure on some hardware platforms. This presentation summarizes the guarantees that are given by Java's memory model and teaches how to properly use volatile and final fields or synchronized code blocks. Instead of discussing the model in terms of memory model formalisms, this presentation builds on easy-to follow Java code examples.
www.denizoguz.com-For an in company JDK 7 orientation I have prepared a presentation which summaries new features of JDK 7. I would like to make it public for everyone who needs it.
Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...Raffi Khatchadourian
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. In this talk, I will first overview several new, key features of Java 8 that can help make programs easier to read, write, and maintain, especially in regards to collections. These features include Lambda Expressions, the Stream API, and enhanced interfaces, many of which help bridge the gap between functional and imperative programming paradigms and allow for succinct concurrency implementations. Next, I will discuss several open issues related to automatically migrating (refactoring) legacy Java software to use such features correctly, efficiently, and as completely as possible. Solving these problems will help developers to maximally understand and adopt these new features thus improving their software.
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...Raffi Khatchadourian
Machine Learning (ML), including Deep Learning (DL), systems, i.e., those with ML capabilities, are pervasive in today’s data-driven society. Such systems are complex; they are comprised of ML models and many subsystems that support learning processes. As with other complex systems, ML systems are prone to classic technical debt issues, especially when such systems are long-lived, but they also exhibit debt specific to these systems. Unfortunately, there is a gap of knowledge in how ML systems actually evolve and are maintained. In this paper, we fill this gap by studying refactorings, i.e., source-to-source semantics-preserving program transformations, performed in real-world, open-source software, and the technical debt issues they alleviate. We analyzed 26 projects, consisting of 4.2 MLOC, along with 327 manually examined code patches. The results indicate that developers refactor these systems for a variety of reasons, both specific and tangential to ML, some refactorings correspond to established technical debt categories, while others do not, and code duplication is a major cross-cutting theme that particularly involved ML configuration and model code, which was also the most refactored. We also introduce 14 and 7 new ML-specific refactorings and technical debt categories, respectively, and put forth several recommendations, best practices, and anti-patterns. The results can potentially assist practitioners, tool developers, and educators in facilitating long-term ML system usefulness.
Concurrent Programming in Java provides a brief overview of the following topics:
• Java language support for concurrency
• Concurrency utilities (java.util.concurrent package)
• Java collections for multithreading (java.util package)
• Parallel streams in Java 8.
Try out the examples. Source code here: https://github.com/CodeOpsTech/ConcurrentJava
Introduction to Java programming - Java tutorial for beginners to teach Java ...Duckademy IT courses
Check out the course: https://www.duckademy.com/course/java-programming Learn Java from scratch in an easy and entertaining way. The Easy-to-follow Java programming course on Duckademy was made for beginners. In this course we start at the very basics (from zero) and go through lots of interesting exercises and analogies that will take you to an advanced level. By the end of the course you will have all the knowledge needed to move on and specialize in Java. The course is easy to follow and things are well explained. Furthermore, to make your learning easier and more enjoyable throughout the course we will develop a nostalgic, text-based fantasy game.
The course is recommended to anyone who wants to learn Java. Ideal for those who are new to programming, but it can be useful and enjoyable for people who want to switch to Java from a different programming language.
By the end of the course you will be able to build simple, but fully functional programs. You will also gain all the knowledge needed to specialize in Java and become a well-payed Java expert later on.
Check out the course: https://www.duckademy.com/course/java-programming
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. This talk will detail several new key features of Java 8 that can help make programs easier to read, write, and maintain. Java 8 comes with many features, especially related to collection libraries. We will cover such new features as Lambda Expressions, the Stream API, enhanced interfaces, and more.
Java is Object Oriented Programming. Java 8 is the latest version of the Java which is used by many companies for the development in many areas. Mobile, Web, Standalone applications.
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
A introductory slides for those who want to learn and know some basics of Java.Also for those persons who want to compare coding difference between Java and .net
At first glance, writing concurrent programs in Java seems like a straight-forward task. But the devil is in the detail. Fortunately, these details are strictly regulated by the Java memory model which, roughly speaking, decides what values a program can observe for a field at any given time. Without respecting the memory model, a Java program might behave erratic and yield bugs that only occure on some hardware platforms. This presentation summarizes the guarantees that are given by Java's memory model and teaches how to properly use volatile and final fields or synchronized code blocks. Instead of discussing the model in terms of memory model formalisms, this presentation builds on easy-to follow Java code examples.
www.denizoguz.com-For an in company JDK 7 orientation I have prepared a presentation which summaries new features of JDK 7. I would like to make it public for everyone who needs it.
Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...Raffi Khatchadourian
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. In this talk, I will first overview several new, key features of Java 8 that can help make programs easier to read, write, and maintain, especially in regards to collections. These features include Lambda Expressions, the Stream API, and enhanced interfaces, many of which help bridge the gap between functional and imperative programming paradigms and allow for succinct concurrency implementations. Next, I will discuss several open issues related to automatically migrating (refactoring) legacy Java software to use such features correctly, efficiently, and as completely as possible. Solving these problems will help developers to maximally understand and adopt these new features thus improving their software.
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...Raffi Khatchadourian
Machine Learning (ML), including Deep Learning (DL), systems, i.e., those with ML capabilities, are pervasive in today’s data-driven society. Such systems are complex; they are comprised of ML models and many subsystems that support learning processes. As with other complex systems, ML systems are prone to classic technical debt issues, especially when such systems are long-lived, but they also exhibit debt specific to these systems. Unfortunately, there is a gap of knowledge in how ML systems actually evolve and are maintained. In this paper, we fill this gap by studying refactorings, i.e., source-to-source semantics-preserving program transformations, performed in real-world, open-source software, and the technical debt issues they alleviate. We analyzed 26 projects, consisting of 4.2 MLOC, along with 327 manually examined code patches. The results indicate that developers refactor these systems for a variety of reasons, both specific and tangential to ML, some refactorings correspond to established technical debt categories, while others do not, and code duplication is a major cross-cutting theme that particularly involved ML configuration and model code, which was also the most refactored. We also introduce 14 and 7 new ML-specific refactorings and technical debt categories, respectively, and put forth several recommendations, best practices, and anti-patterns. The results can potentially assist practitioners, tool developers, and educators in facilitating long-term ML system usefulness.
Concurrent Programming in Java provides a brief overview of the following topics:
• Java language support for concurrency
• Concurrency utilities (java.util.concurrent package)
• Java collections for multithreading (java.util package)
• Parallel streams in Java 8.
Try out the examples. Source code here: https://github.com/CodeOpsTech/ConcurrentJava
Introduction to Java programming - Java tutorial for beginners to teach Java ...Duckademy IT courses
Check out the course: https://www.duckademy.com/course/java-programming Learn Java from scratch in an easy and entertaining way. The Easy-to-follow Java programming course on Duckademy was made for beginners. In this course we start at the very basics (from zero) and go through lots of interesting exercises and analogies that will take you to an advanced level. By the end of the course you will have all the knowledge needed to move on and specialize in Java. The course is easy to follow and things are well explained. Furthermore, to make your learning easier and more enjoyable throughout the course we will develop a nostalgic, text-based fantasy game.
The course is recommended to anyone who wants to learn Java. Ideal for those who are new to programming, but it can be useful and enjoyable for people who want to switch to Java from a different programming language.
By the end of the course you will be able to build simple, but fully functional programs. You will also gain all the knowledge needed to specialize in Java and become a well-payed Java expert later on.
Check out the course: https://www.duckademy.com/course/java-programming
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. This talk will detail several new key features of Java 8 that can help make programs easier to read, write, and maintain. Java 8 comes with many features, especially related to collection libraries. We will cover such new features as Lambda Expressions, the Stream API, enhanced interfaces, and more.
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
This is First Lecture of java Programming which cover all basic points (ie. History and feature of java, Introduction to java, about variables data type and compilation....
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...Sagar Verma
16. Threads in Java
Non-Threaded Applications
Threaded Applications
Process based multitasking Vs Thread based multitasking
Thread API in Java
Creating Threads
States of a Thread
Synchronization for threads; static and non-static synchronized methods; blocks; concept of object and class locks
Coordination between threads - wait, notify and notifyAll methods for inter-thread communication
17. Applets
What are applets?
Need for Applets
Different ways of running an applet program
Applet API hierarchy
Life Cycle of an applet
Even Handlers for applets, mouse events, click events
18. Swing GUI
Introduction to AWT
Introduction to Swing GUI
Advantages of Swing over AWT
Swing API
Swing GUI Components
Event Handlers for Swing
Sample Calculator application using Swing GUI and Swing Event handling
19. JDBC
What is JDBC; introduction
JDBC features
JDBC Drivers
Setting up a database and creating a schema
Writing JDBC code to connect to DB
CRUD Operations with JDBC
Statement types in JDBC
Types of Rowset, ResultSet in JDBC
20. Access Modifiers in Java
What are access modifiers?
Default
Protected
Private
Public
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
2. Java 9
Java 9 was released on 21st September 2017
The main goals for Java 9 are to:
Make the Java Standard Edition platform, and the JDK, more
navigable to scale down for small computing devices.
Improve the overall security and maintain not only the JDK but
the Java Implementations in general.
Allow overall improved application performance.
Make it easier for Java developers to build and uphold the
code libraries and larger applications, for both the Java SE and
EE Platforms.
3. Java 9 Features
Jshell
JPMS (Java Platform Module System)
Jlink (Java Linker)
Http/2 Client API
Process API Update
Private method inside interface
4. Java 9 Features cont..
Try with resources enhancement
Factory method to create unmodifiadble collections
Stream Api enhancements
< > (Diamond )operator Enhancement
SafeVargs annotations
G1GC (Garbage First Garbage collector)
5. JShell
Like a playground for Begineers where individual can start
learning without writing the boilerplate code
The Java Shell tool (JShell) is an interactive tool for learning
the Java programming language and prototyping Java code.
JShell is a Read-Evaluate-Print Loop (REPL), which evaluates
declarations, statements, and expressions as they are entered
and immediately shows the results.
The tool is run from the command line.
6. JPMS
Until java 8 ,while developing software we first define the
classes, interfaces,enum and put this inside package and then
this packages is kept as Jar file.
This has few disadvantages eg NoClassDefFoundError,
VersionConflict, Security Problem.
Untill Java 8, Jdk and Jre had monolithic structure i.e. it cannot
be divided. To execute a simple hello World program of 1 kb
the client had to load 400Mb of JRE on client machine.
All this problem is also known as Java Hell.
To overcome this problem JPMS comes into picture
7. In modular programming the Jvm checks in the start of
execution where all the required files are present or no
.Therefore there is no Chance of NoclasssDefFoundError.
Part Of Jigsaw Project
Project started in 2005
8. JLink
To run a simple hello World program we need JRE . JRE
contains rt.jar whose size is 60Mb . This rt.jar contains all the
predefined class i.e it contains 4300+ classes but we required
hardly 5-6 classes . The size of Jre is 400Mb . Therefore to run
1 kb program 400mb is required . Therefore java is heavy
weight.
To create our own customised jre we use jLink
We can now use java for Iot deices,micro-services etc.
9. HTTP/2 Client
To send an Http request to server from a java program we
need some software and that is http/2 clinet.
Until java 8 we used httpUrlConnection but this had certain
drawback
httpUrlconnection was developed in 1997 ,introduced in java
1.0 and was still being used until java 8.
httpUrlconnection was difficult to use
Only one request at a time.
It supported only data in text format and not binary data.
It works in blocking mode i.e wait for the next request.
10. Therefore Java programmer started using Apache Http client
or google Httpclient.
Now in Java 9 they introduced Http/2 client
Very easy to use
Works in both blocking and non blocking mode
Works with data in both text and binary format
Can send multiple requests.
11. Process API Updates
Java communication with processor is very difficult until java
8, but from java 9 new methods added to Process class i.e Api
got enhanced.
Most imp feature of java 9
System.out.println(ProcessHandle.current().pid()); to get the
current running jvm process
12. Private method inside Interface
Until 1.7 inside interface wecan take only public and abstract methods and
every variable present inside interface is public static and final
From 1.8 we can take default methods and static methods
From 1.9 we can take private methods inside interface
Without affecting the implementation classes we can extends the
functionality of interface by adding default methods
Interface inter
{
M1();
M2();
}
13. Class a implements inter
{
M1() {}
M2() {}
}
.
.
.
Class class10 implents inter
{
M1(){}
M2(){}
}
14. To add a method in interface we have to make changes in all
the implanting classes .therefor we add default method
Interface infer
{
M1(){}
M2(){}
Default void m3(){}
}
Implementing classes are not required to override default
methods.
15. Private methods in interface are introduced to make code
reuseable
Without affecting implementation class how we can get Code
Reusablilty?.
Consider the below code
Since the method is private it is hidden from the implementing
class
This make code reusable .
17. Try with Resources enhancement
Try with resources
Until 1.6 , if we have to close the resources we wrote that code in finally
block
From 1.7 try with resources came
try(r1;r2)
{
}
These resources were closed automatically after the try block.
18. Fw fw=new Fw(“abc.txt”);
Fr fr=new Fr(“input.txt”);
Try(fw;fr)
{
}// Not allowed in Java 8
// We have to declare inside try()
From Java 9 we can use try with resources where resources are already
being created
19. Factory Methods to create
Unmodifiable Collections
List <String> l =new ArrayList<>();
L.add(“A”);
L.add(“B”);
L.add(“C”);
Now if I have to make list immutable??
Until Java 8
List <String > l2=Collections.unmodifiableList(l);
From Java 9
List<String> l=List.of(“A”,”B”,”C”);
Set.of();
20. Stream API Enhancement
Collection is a group of objects.
The main objective of collection is to hold objects as a single entitiy and
Stream is used to process this object from the collections.
New Methods in Java 9
takeWhile() //Default Methods in Stream Interface
dropWhile() -------- -------
Stream.iterate() with three argument
Stream.ofNullable() //to check if null reference
21. <> Operator
ArrayList <String> l =new ArrayList<String>();
Generics is used to perform typesafety and perform and resolve type
casting problems
From Java 7
ArrayList <String> l =new ArrayList<>(); // No need to specify the type
parameter
Also know as type inference
This <>operator is only applicable for normal classes and not applicable
for Anonymous Inner Classes
From Java 9 we can use <>(diamond) operator in anonymous inner
classes.
22. safeVarargs Annotation
In Java 5 m1(int … x)
M1(List<String>… x)
Here there may be a chance of heap Pollution.
// Warning by compiler
If we want to supress this warning we can go for safevarargs annotations
This concept came in java 8 wherein safevarargs is used for static ,final
,constructor methods
From Java 9 ,it is also used for private methods also
23. G1GC
Garbage First Garbage collection
Many type of GC
Serial Gc
Parallel GC
Concurrent mark and Sweep gc
G1gc //from 1.6
First three will work based on generations
G1gc divides the heap into parts and uses the part with most garbage i.e
highest number of objects that are eligible for gc and will destroy that area
Performance wise g1gc is best
From Java 9 ,g1gc is default garbage collector
Untill java 8 , parallel gc was default garbage collector