0% found this document useful (0 votes)
8 views

Java Version wise Features

Uploaded by

Vinoth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Java Version wise Features

Uploaded by

Vinoth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Java Version wise

Features
-Vinoth S P
JDK 1 Features

► The first stable version, JDK 1.0.2, was called Java 1(OAK).
► On February 19, 1997, JDK 1.1 was released having a list of big features such
as:
► AWT event model
► Inner classes
► JavaBeans
► JDBC
► RMI
► Reflection which supported Introspection only, no modification at runtime was
possible.
► JIT (Just In Time) compiler for Windows
► Just-in-time (JIT) compiler is a program that turns Java bytecode into
instructions that can be sent directly to the processor.
► Inner class means one class which is a member of another class. There are
basically four types of inner classes in java
► 1) Nested Inner class
► (access any private instance variable of outer class interface can also be
nested and can have all the access specifiers)
► Objects are created for inner class by -> Outer.Inner in = new Outer().new
Inner();
► we can’t have static method in a nested inner class because an inner class is
implicitly associated with an object of its outer class so it cannot define any
static method for itself. An interface can also be nested and nested interfaces
have some interesting properties.
► 2) Method Local inner classes(Inner class can be declared within a method of
an outer class)
► Method Local inner classes can’t use local variable of outer method until that
local variable is not declared as final.(till JDK 1.7)
Anonymous inner classes
► 3) Anonymous inner classes are declared without any name at all. They are
created in two ways.
a) As subclass of specified type b) As implementer of the specified interface
► 4) Static nested classes
► Like a static member of outer class.
Remote Method Invocation

► Remote Method Invocation (RMI) is an API which allows an object to invoke a


method on an object that exists in another address space, which could be on
the same machine or on a remote machine.
► Through RMI, object running in a JVM present on a computer (Client side) can
invoke methods on an object present in another JVM (Server side).
► RMI creates a public remote server object that enables client and server side
communications through simple method calls on the server object.
Reflection
► Reflection is commonly used by programs which require the ability to examine
or modify the runtime behavior of applications running in the Java virtual
machine."
► Introspection is the ability of a program to examine the type or properties of
an object at runtime.
► Reflection is the ability of a program to examine and modify the structure and
behavior of an object at runtime
JDBC

► Java Database Connectivity (JDBC) is an application programming interface


(API) for the programming language Java, which defines how a client may
access a database.
► It is a Java-based data access technology used for Java database connectivity.
It is part of the Java Standard Edition platform, from Oracle Corporation.
JavaBeans

► JavaBeans are classes that encapsulate many objects into a single object (the
bean).
► It is a java class that should follow following conventions: Must implement
Serializable.
► It should have a public no-arg constructor.
► All properties in java bean must be private with public getters and setter
methods.
► Setter should have return-type should be void.
► The return-type should not be void i.e. according to our requirement we have
to give return-type(Any type).
AWT

► Java AWT (Abstract Window Toolkit) is an API to develop GUI or window-based


applications in java.

► Java AWT components are platform-dependent i.e. components are displayed


according to the view of operating system. AWT is heavyweight i.e. its
components are using the resources of OS.
► The java.awt package provides classes for AWT api such
as TextField, Label, TextArea, RadioButton, CheckBox, Choice, List etc.
Internationalization(I18N) in java

► The process of designing web applications in such a way that which provides
support for various countries, various languages and various currency
automatically without performing any change in the application is called
Internationalization.
► 1. Create the Properties Files
► greetings = Hello (MessagesBundle.properties)
► Define the Locale
► A Locale object specified a particular region and language.
► aLocale = new Locale(“en”,”US”);
► frLocale = new Locale(“fr”,”FR”);
► currentLocale = new Locale(language, country);
► Create a ResourceBundle
► messages = ResourceBundle.getBundle(“MessagesBundle”, currentLocale);
► There are two inputs to the getBundle method: the properties file and the
locale. “MessagesBundle” refers to the family of properties files:
► MessagesBundle_en_US.properties
► MessagesBundle_fr_FR.properties
► Fetch the Text from the ResourceBundle
► String msg1 = messages.getString(“greetings”);

You might also like