Showing posts from 2015Show All
HTTP Status Codes

HTTP Status Codes 1. 2xx class of status codes indicates that the action request by client was received and processed successfully without any issues. 2. 3xx class of status code indicates the client must take additional …

Difference between Set and List Interface in JAVA

Difference between Set and List Interface in JAVA List 1.List an Ordered grouping of elements i.e.Maintain order of added Element(add the element in List and print on Consol). 2.List can contain duplicate elements 3.New …

Collection: Sort to list Element, Convert Array  to List, Covertion List to Array, Use of Iterator , Add collection in List

import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; public class List1 { public static void main(String a[]) { List<Integer>…

Linear Search :Java Program

package javaPrograms; import java.util.Scanner; public class LinerSearch { static int n; public static void main(String a[]) { Scanner sc=new Scanner(System.in); System.out .println("Enter the…

Reverse String : Java Program

package javaPrograms; import java.util.Scanner; public class ReverseString { //static  String reverseString;   public static void main(String a[])   {  Scanner sc=new Scanner(System.in);  System.out.println("…

Palindrome Number :Java Program

package javaPrograms; import java.util.Scanner; public class  PalindromeNumber { public static void main(String args[]) { int reversedNumber=0; System.out.println("Enter no to test palindrome or not")…

Fibonacci Series :Java Program

package javaPrograms; import java.util.Scanner; public class FibonacciSeries { public static void main(String arr[]) { Scanner sc=new Scanner(System.in); int a=0,b=1; System.out.println("Enter no. to rep…

Reverse Number -Java Program

package javaPrograms; import java.util.Scanner; public class ReverseNumber { public static void main(String a[]) { Scanner sc=new Scanner(System.in); System.out.println("Enter no. to generate Reverse Number:\…

Armstrong Number-Java Program

package javaPrograms; import java.util.Scanner; public class ArmstrongNumber { public static void main(String a[]) { Scanner sc=new Scanner(System.in); System.out.println("enter no to verify Armstrong no.&qu…

String Operations-Java Program

package Prog; /**  * The Class StringOperations //multiline comment  */ public class StringOperations { public static void main(String a[]) throws ArrayIndexOutOfBoundsException { String str="my name is An…

Findout Factorial of Number and  Sum of Factorial  Series -Java Program

package Prog; import java.util.Scanner; public class Factorial { public static void main(String args[]) { int n; Scanner sc=new Scanner(System.in); System.out.println("Enter the no.  for factorial&quo…

Prime No. Program

package Prog; import java.util.Scanner; public class PrimeNo {   public static void main(String a[])   {         System.out.println("Enter no. to verify, prime or not");     Scanner sc=new Scanner(System.i…

Selenium webdriver - Selecting checkbox based on table value or specific value

HTML Page <html> <head><title>Selenium webdriver - Selecting checkbox based on table value or specific value</title> </head> <body> <table border=2> <tr> …

Open New Tab  with New URL  Using Webdriver

import java.util.ArrayList; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class TableCheckbox {    public s…

Bubble Sort in JAVA

package Prog; import java.util.Scanner; public class BubbleSort { public static void main(String a[]) { Scanner sc=new Scanner(System.in); System.out.println("Enter no. of intger to be sort" );   …

Addition of Two Matrix

package Prog; import java.util.Scanner; public class AddMatrix { public static void main(String a[]) {        System.out.println("Enter the  rows and columns of matrix");        Scanner sc=new Scanner(Sys…

Addition of Two Numbers

package Prog; /**  * The Class Addition.  */ public class Addition { /** * The main method. * * */ public static void main(String args[]) { Addition a=new Addition(); a.sum(); } /** *…

Read excel file using poi

//Generic  Function to Excel Read public  Object[][] excelRead(String filePath ,String fileName,String sheetName ) throws IOException {   Object data[][] =null; File file=new File(filePath+"\\"+fileName); Sys…

Navigation on Same Tab

package seleniumOperations; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.interact…

Double Click on Element

package seleniumOperations; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.interacti…

Drag and Drop Handing

import org.openqa.selenium.interactions.Actions; /* */ WebElement draggable=driver.findElement(By.xpath(".//*[@id='draggable']/p"));  WebElement dropable=driver.findElement(By.xpath(".//*[@id='d…

That is All