3:32 pm - Saturday January 21, 2017

Author Archives: veera

HashSet to using find Max and Min Number Max() and Min() Method

BACK This Program used to find  Max and Min from hashset by using Max() and Max() method. Example Program import java.util.HashSet; import java.util.Collections; class FindMaxHashSet { public static void main(String[] args) {...

HashSet to remove specfic element on output Remove() method

BACK This Program used to remove the specific element from hashset by using remove() method. Example Program package com.example; import java.util.HashSet; class HashSetRemove { public static void main(String[] args) {// creating...

LinkedList to Remove last element on output RemoveLast() method

BACK This  method  used to remove last element from the LinkedList. Example Program package com.example; import java.util.*; public class LinkedListRemoveLast { public static void main(String[] args) { // create a LinkedList LinkedList...

LinkedList to add element on output Offer() method

BACK This Program is used to add element using Offer() method. Example Program package com.example; package com.example; import java.util.*; public class LinkedListOffer { public static void main(String[] args) { // create a...

LinkedList to Print First element on the Output using Peek() method

BACK This Program is used to print First element using Peek() method. Example Program package com.example; import java.util.*; public class LinkedListPeek { public static void main(String[] args) { // create a LinkedList LinkedList...

LinkedList to add element on output using Push() method

BACK This Program is used to add element on output using Push() method. Example Program   package com.example; import java.util.*; public class LinkedListPush { public static void main(String[] args) { // create a LinkedList LinkedList...

LinkedList remove head elements to output using Poll() method

BACK This Program is used to remove head elements from LinkedList by using Poll() method. Example Program package com.example; package com.example; import java.util.*; public class LinkedListPoll { public static void main(String[]...

Inserts all of the elements in the specified collection into this list(int index, Collection c)

BACK This program is used to inset the all elements in the specified list. Example Program import java.util.ArrayList; public class Arrayad { public static void main(String args[]) { // create an empty array list1 with an initial...

Inserts all of the elements in the specified collection into this list

BACK This program is used to insert all the elements in the specified list. Example Program import java.util.ArrayList; public class Arrayad { public static void main(String args[]) { // create an empty array list1 with an initial...

Program that returns number of elements in the Arraylist

BACK This program is used to returns number of elements in the ArrayList. Example Program package com.example; import java.util.*; public class LinkedListPoll { public static void main(String[] args) // create a LinkedList { LinkedList...

Inserts all of the elements in the specified collection into this list

BACK Example Program import java.util.ArrayList; public class Arrayad { public static void main(String args[]) { // create an empty array list1 with an initial capacity ArrayList arrlist = new ArrayList(5); // use add() method...

Program that returns number of elements in the Arraylist

BACK This Program is used to returns number of elements in the ArrayList Example Program import java.util.ArrayList; class Arraysize { public static void main(String[] args) { // create an empty array deque with an initial capacity ArrayList<Integer>...

Program that returns number of elements in the Arraylist

BACK This Program is used to returns number of elements in the ArrayList. Example Program import java.util.ArrayList; class Arraysize { public static void main(String[] args) { // create an empty array deque with an initial capacity ArrayList<Integer>...

Removes the element at the specified position in the Array list(int index).

BACK This method is used to remove the element at the specified position in Array List. Example Program import java.util.*; public class ArrayListRemove { public static void main(String args[]) { // create an arraylist ArrayList<Integer>...

Removes the element at the specified position in the Array list(int index)

  BACK This method is used to remove the element at the specified position in Array List Example Program import java.util.*; public class ArrayListRemove { public static void main(String args[]) { // create an...

Inserts all of the elements in the specified collection into this list

BACK This method is used to insert all of the elements in the specified collection into the list. Example Program import java.util.ArrayList; public class Arrayad { public static void main(String args[]) { // create an empty array...

Remove the first occurrence of the specified element from Array list remove(Object o)

BACK This method is used to remove the element at the specified position in Array List Example Program import java.util.ArrayList; import java.util.List; public class ArrayListSet { public static void main(String args[]) { // create...

Array List program for replace the element at the specified position set(int index, E element)

BACK This method is used to replace the element at the specified position in Array List. Example Program import java.util.ArrayList; public class ArrayListSet { public static void main(String args[]) { // create an arraylist ArrayList...

Java Example Program for delete duplicate element in an array

public class Task { /** * @ author:Candid @ description:Java Program to delete Duplicate elements * in an array */ public static void main(String args[]) { int array[] = { 10, 20, 30, 20, 40, 40, 50, 60, 70,...

Java Example Program for inverse matrix

public class Matrix { public static void main(String[] args) { // array creation and allocated memory int[][] array = new int[3][3]; // to initialize the values array[0][0] = 1; array[0][1] = 2; array[0][2]...