Java

Sending an email after test execution completed is a very nice idea. it helps all members to look at the report and act accordingly.

Today, we will see how to send an email using JavaMail API. we will also make sure that it will be easy to configure in test automation framework.

Continue Reading

Java has lot of keywords which are getting used with specific conditions during coding. Today we will see the most popular keywords. Final Finally Finalize   Final:- It is used in the following cases: If the final keyword is attached to a variable then the variable becomes constant i.e. its value cannot be changed in the […]

Continue Reading

In previous post we have installed and run the eclipse, now lets write first program. Step1: Launch the Eclipse: Step2: Select the workspace where you want to save the project.   Step3: Create Java project: Click on File > New > Other Project now select the java project and click on next   Enter project name […]

Continue Reading

It is always recommended that while writing the code use IDE ( integrated Development Environment) software. it helps you in several ways. it will create complete project for you, it will prompt you on different kinds of errors. it helps you to compile and run the program which you have written and many more functionality […]

Continue Reading

Object-oriented programming (OOP) is one of the bigger programming buzzwords of recent years, and you can spend years learning all about object-oriented programming methodologies and how they can make your life easier than The Old Way of programming. It all comes down to organizing your programs in ways that echo how things are put together […]

Continue Reading

First of all, a platform is anything on which a program is run(in lay man term). A platform is either the machine itself, or a primitive kernel or a fully developed OS. Languages can be platform dependent or independent. Dependent means its executable code and source code varies from platform to platform. That is to […]

Continue Reading

Java is a computer programming language. It enables programmers to write computer instructions using English based commands, instead of having to write in numeric codes. It’s known as a “high-level” language because it can be read and written easily by humans. Like English, Java has a set of rules that determine how the instructions are […]

Continue Reading

package JavaPrograms; import java.util.*; public class ReverseString { public static void main(String args[]) { String original, reverse =””; Scanner in = new Scanner(System.in); System.out.println(“Enter a string to reverse”); original = in.nextLine(); int length = original.length(); for ( int i = length – 1 ; i >= 0 ; i– ) reverse = reverse + original.charAt(i); […]

Continue Reading

package JavaPrograms; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; public class RemoveduplicateArray { // // Remove duplicate entries from an array of long integers // // davekw7x // public static void main(String[] args) { // // A long integer array with some duplicated values // long [] longArray = { 11,0, 11, […]

Continue Reading

package JavaPrograms; import java.util.*; public class PrimeNumber { //Note: Scanner class work with JDK1.5 or above public static void main(String args[]) { int n, i, res; boolean flag=true; System.out.println(“Please Enter a No.”); Scanner scan= new Scanner(System.in); n=scan.nextInt(); for(i=2;i<=n/2;i++) { res=n%i; if(res==0) { flag=false; break; } } if(flag) System.out.println(n + ” is Prime Number”); else System.out.println(n […]

Continue Reading