Friday, September 11, 2015

What is the difference between Abstract Class and Interface?

What is the difference between an Interface and an Abstract class ?

Java provides and supports the creation both of abstract classes and interfaces. Both implementations share some common characteristics, but they differ in the following features:

All methods in an interface are implicitly abstract. On the other hand, an abstract class may contain both abstract and non-abstract methods.


A class may implement a number of Interfaces, but can extend only one abstract class.

In order for a class to implement an interface, it must implement all its declared methods. However, a class may not implement all declared methods of an abstract class. Though, in this case, the sub-class must also be declared as abstract.

Abstract classes can implement interfaces without even providing the implementation of interface methods.

Variables declared in a Java interface is by default final. An abstract class may contain non-final variables.


Members of a Java interface are public by default. A member of an abstract class can either be private, protected or public.

An interface is absolutely abstract and cannot be instantiated. An abstract class also cannot be instantiated, but can be invoked if it contains a main method.
Scale out and scale up with Compute Engine Autoscaler and 32-core VMs, now GA. http://goo.gl/IFFNoP

Thursday, September 10, 2015

Types of Java Methods

Types of Method

Method has lines of codes to implement some task referred to its name. It returns some value as result. Below are the types of method which are exists in java world:


How to Shuffle a String object

How to shuffle an array in Java? There are two approaches to shuffle an int array(randomizes the order of the elements in an array), one is to use the Collections.shuffle() method, the other is to manipulate array elements. http://www.programcreek.com/2012/02/java-method-to-shuffle-an-int-array-with-random-order/

TryCatch

We are the leading training institute in India. We have professional trainers to teach all the popular software and database languages like Java, Google Cloud Services, .Net, PHP, SQL Server, Hadoop, Tableau, BigQuery and many more. http://www.trycatch.co.in/services.html

Wednesday, September 9, 2015

TryCatch

Training and Courses

We have professional trainers, who knows the real world requirements and understand the basic need of a future developer. To know more about our training programs and courses click on the link http://www.trycatch.co.in/services.html

History of Java

History of Java...

There were three members team by the name Green Team. James Gosling, Mike Sheridan, and Patrick Naughton, they developed in June 1991. They just want to develop something for small devices like set-top boxes and televisions. Earlier it was not JAVA, it was Green Talk and file extension was .gt rather than .java. Next Version was by the name Oak. Oak is a symbol of strength and known as national tree of many of countries like USA, France etc.

After this in 1995 Oak was updated to JAVA as Oak it was already a registered name for Oak Technologies.

Java is an island of Indonesia where first coffee was produced (called java coffee).

Java lifecycle

1. JDK Alpha and Beta (1995)
2. JDK 1.0 (23rd Jan, 1996)
3. JDK 1.1 (19th Feb, 1997)
4. J2SE 1.2 (8th Dec, 1998)
5. J2SE 1.3 (8th May, 2000)
6. J2SE 1.4 (6th Feb, 2002)
7. J2SE 5.0 (30th Sep, 2004)
8. Java SE 6 (11th Dec, 2006)
9. Java SE 7 (28th July, 2011)
10. Java SE 8 (18th March, 2014)

Types of Java

Types of JAVA

Java is a programming language which provides us a platform to develop.

In traditional world there are two types of Java. What are they? They are Core & Advance Java. But in Java world, there are three types of java which are

1) J2SE (Java Standard Edition)
2) J2EE (Java Enterprise Edition)
3) J2ME (Java Micro Edition)

Now, Question is raised why we use always 2 with the name Java as in present the latest version is something else. 2 nothing but known as the generation not as version.

Thought

Thought


Each piece of code represents the expertise of developer. You can judge the developer by his/her code. One faulty piece of code may lead to critical damage. So write your code by understanding the fundamental not because someone created and we've to use it.

What is an Object Class?

What Is java.lang.Class Object In Java?
Every class in java is associated with one special object of type java.lang.Class. This object will hold all the metadata of that class like class name, package name, fields, methods, constructors, annotation details etc. This object is created by the JVM when the class is loaded. This object will be used to retrieve the information about a class at run time.