You are here:   HomeJava ProgrammingJava ArrayDeleting Desire Element of Linked List Java Example
by Dinesh Thakur Category: array
 
by Dinesh Thakur Category: array

One-dimensional array that uses a single index. Just like other languages like C/C++ one may think that Java might also have multidimensional arrays too, which are arrays that contain more than one index and can store information in multiple dimensions. But Java does not truly support multidimensional arrays. However, one can achieve the same functionality by declaring an arrays of arrays.



 
by Dinesh Thakur Category: array

Array is a group of related data items, that share a common name with same data type. An individual variable in the array is called an array element.

We can define an array name rollno to represent a set of roll no of a group of students. A particular value is indicated by a number called index number. An index number is present in brackets after the array name.



 
by Dinesh Thakur Category: array

Algorithm for Removing duplicate elements from Array:

step 1: read y

step 2: create two integer array a[],b[] of size y

step 3: initialize c=0

step 4: repeat through step-6 while c less than a.length

step 5: read a[c]

step 6: c=c+1

step 7: initialize c=0

 
by Dinesh Thakur Category: array

With the release of version 1.5, Java introduced a new type of for loop known as enhanced or numerical for loop. It is designed to simplify loops that process elements of array or collection. It is useful when you want to access all the elements of an array but if you want to process only part of the array or modify the values in the array then use the simple for loop.



 
by Dinesh Thakur Category: array

Algorithm for Quick Sort:

Here 'a' is an array of elements and 'first' and 'last' represent the first index and last index of the array 'a' Perform the following steps only if(first<last).

step 1: Set i=first

step 2: Set j=last+l

step 3: Set k=first

 
by Dinesh Thakur Category: array

Matrix addition means addition of respective positions. That is, element of 0th row 0th column of first matrix will be added with 0th row and 0th column of second matrix and placed in resultant matrix at 0th row and 0th column position. And this way all the element positions of first matrix are added with the respective positions of second matrix and stored in resultant matrix at the same position.

 
by Dinesh Thakur Category: array
 
by Dinesh Thakur Category: array

Algorithm for Swap Elements of an Array:

 

step 1: read y

step 2: create two integer arrays a[],b[] of size y

step 3: initialize x=0

step 4: repeat through step-6 while (x < a.length)

step 5; read b[x]

 
by Dinesh Thakur Category: array

charAt():- This is a predefined method of String class present in java.1ang package. It used to extract a specify character from a string by the particular index supplied by the programmer and the index must be within the length of the String.



 

Page 1 of 10



Subscribe To Free Daily Newsletter!

Get Free News Updates Delivered Directly To Your Inbox
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.



What's New and Popular





Popular Article