Difference Between Java, Core Java and Advance Java

Here you will learn about difference between java, core java and advance java. Mostly beginner java programmers have confusion about these 3 terms in their mind. Below I have explained them to clear their confusion. Java It is a high level programming language. Java is available in three flavors. Java Standard Edition (J2SE or JSE) Java Enterprise Edition (J2EE or JEE) Java Macro Edition (J2ME or JME) Java is a combination of above there things. Core Java (J2SE or JSE)

Read more

How to Create Executable JAR File in Eclipse IDE?

Here you will learn how to create executable jar file in eclipse. An eclipse ide provides facility to convert a project into executable jar file in java. This process is really helpful in case you have development some desktop application in java and want an executable file to directly run the application. Also Read: How to Add or Import Jar in Eclipse Project For demonstration purpose I have given simple java program to develop a gui application using swing. You can use

Read more

How Many Ways to Create Object in Java?

How many ways to create object in Java? The answer is there are many ways but in this tutorial I am sharing the 5 ways to do this. Using new Keyword Using object cloning Using Class.forName() Using Class Loader Using Object Deserialization Below I have discussed each of these methods one by one with example.   How Many Ways to Create Object in Java? Method 1: Using new Keyword It is most common and popular method to create object in

Read more

Can We Override static Method in Java?

Can we override static method? is another important java interview question. Lets first take a look on what is method overriding. Method Overriding: When parent and child class have methods with same signature then it is called as method overriding. At run time compiler decides which method to call depending upon object type. Also Read: Can We Overload main Method in Java? Can We Override static Method in Java? No, we can’t override static method. Static method is not a part of object,

Read more

How to Change Tomcat Port Number?

Here you learn how to change tomcat port number. The default port number of tomcat is 8080. If the port number assigned to tomcat is used by any other application then you can’t run tomcat on that port. In that situation the only solution is to change tomcat default port number. There are two ways to achieve this that I have mentioned below. How to Change Tomcat Port Number?   Method 1: Tomcat Installation Directory 1. Go to conf folder

Read more

Can We Overload main Method in Java?

Here you will get answer for very basic question asked by beginners i.e. can we overload main method in Java? A function is overloaded in java by changing the number of arguments or their type. The main method can also be overloaded in the same way we overload any other method. How Can We Overload main Method in Java? Take below example.

Output String args[] In above program there are 3 overloaded main methods. If you will run the program it

Read more

Java Program to Insert Element in Array at Specified Position

Here you will get java program to insert element in array at specified position. How it works? First copy all the elements before the position where element is to be inserted in a new array. Now assign the element at given position in the new array. Finally copy all the elements after the position where element is to be inserted in a new array. We can partially copy elements of one array to another using System.arraycopy() method. Its syntax is

Read more

How to Send Email in Java Using SMTP?

Here you will learn how to send email in java using smtp. JavaMail API provides the functionality for sending email. The process involves following three step. Get Session Object Compose Message Send Message For sing JavaMail API we have to import jars mail.jar and activation.jar. Download the jars from below link and import in your project. Download: http://www.javatpoint.com/src/mail/mailactivation.zip Image Source Send Email in Java Using SMTP Example Below is the Java program to send email. Make sure to change the host

Read more
1 2 3 9