1182 Views
Sorting is a way to arrange elements (objects) of a list or array in a certain order. The order may be in ascending or descending order. Another useful class in java.util package.   the java.util package is the Collections class, which include the sort() method for sorting lists alphabetically ...
Anamika Gupta
Dec 15, 2021
1128 Views
The size() method to define that how many times the loop should run. The looping through the principle of an ArrayList with a for loop public class Main {    public static void main(String[] args) {      ArrayList<String> mobiles = new ArrayList<String>();     mobiles.add("Samsung");   ...
Anamika Gupta
Dec 15, 2021
1164 Views
To delete an element, use the remove() method and refer to the index number: import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList<String> mobiles = new ArrayList<String>(); mobiles.add("Samsung"); mobiles.add("Apple"); ...
Anamika Gupta
Dec 14, 2021
1101 Views
By using the get() method we can access an element in the ArrayList, which is assigned to the index number: import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList<String> mobiles = new ArrayList<String>(); mobiles.add("Samsung"); ...
Anamika Gupta
Dec 14, 2021
1031 Views
In java.util package the ArrayList class is found which is used to resize Array. The main difference between an ArrayList and a built-in array in Java is that the syntax is also slightly different and the size of the array cannot be modified. Whenever you want to you can add and remove elements from ...
Anamika Gupta
Dec 14, 2021
1396 Views
Machine learning is used to build and examine data and statistics. Machine Learning is a proper arrangement of the program that analyses data and learns to predict the conclusion of programs. It is an advanced step into the guidance of artificial intelligence (AI). Points to start Machine learning Under ...
Anamika Gupta
Jan 20, 2020
1763 Views
Java store list of values in arrays. An array  is a group of contiguous (near) memory locations that all have the same name and the same type.  To refer to a specific locations or element within the array, we specify the name of the array and position number of the appropriate elements in ...
Anamika Gupta
Sep 21, 2018
2699 Views
1. array_change_key_case :-  It changes all the keys of  an array in uppercase. <?php $employee_id=array("Jim"=>"40535","Krish"=>"83007","Joe"=>"41233"); print_r(array_change_key_case($employee_id,CASE_UPPER)); ?> Output Array ( [JIM] => 40535 [KRISH] ...
Anamika Gupta
Jul 23, 2018
1953 Views
Function play an important role in programming language as it organise our code in a proper manner. We can use our code over and over by naming it only. The function works very similar to variable, but they are more powerful than that. Function Syntax <?php function functionName() { // ...
Anamika Gupta
Jul 10, 2018
2321 Views
Javascript and HTML binding To insert javascript in your html page  which is very basic and easy javascript and their fundamentals First, you create a  HTML page index.html  in your IDE( i.e  webstrom, netbeans, Visual Studio etc..) . In  index.html page ...
Anamika Gupta
Mar 23, 2018
2380 Views
Array are used to store multiple value in a single variable.It can hold multiple value in one time For example:Storing the list of brand in single list of item be like this: var brand1=”lancer”; var brand2=”puma”; var brand3=”lee cooper”; var brand4=”reebok”; In a ...
Anamika Gupta
Feb 05, 2018
2551 Views
The list is the most useful data collection in python. It acts like an Array and has associated functions to perform multiple operations in the List in Python. Here we will elaborate the functionality and uses of List. Let's start with an empty list creation and add String and Dictionary ...
Sheetal Kumar
Feb 04, 2018
Page 1 of 1 Pages       Total Records 12
  • First
  • Prev
  • 1
  • Next
  • Last