Java Bangla Tutorials 83 : ArrayList (part-2)

preview_player
Показать описание
➡️ In this video, I will show how to use ArrayList.
⭐️ Video Contents ⭐️
⌨️ (00:00) Intro
⌨️ (00:11) ArrayList (part-2)
⌨️ (08:30) outro

🛑 Web development? Checkout following playlists :

🛑 Programming languages? Check out the following playlists:

🛑 Android development? Check out the following playlists:

🛑 HSC Students? Are you worried about ICT? I have created 377 videos for you. check out the following playlists-

🛑 CSE Students? Checkout following playlists :

🛑 MS Office? Trying to learn MS office to improve your skill? Checkout following playlists :

#java #anisul_islam #java_bangla_tutorial #web_development #bangla_web_development #andorid #javaprogramming #javatutorial #bangla_tutorial #java_anisul_islam
Рекомендации по теме
Комментарии
Автор

Thank you Sir..ekhono dekhtesi..asha kori shikhe jabo..array list asholeo darun ekta jinish.

mashfiqrizvee
Автор

ekhon porjonto ei video ta best chilo.joss

mahfuzurrahman
Автор

package ArrayList;

import java.util.ArrayList;


public class ArrayList2 {
public static void main(String[] args){
ArrayList<Integer> num = new ArrayList<>();
num.add(100);
num.add(102);
num.add(104);
num.add(106);
num.add(4, 108);

boolean a = num.isEmpty();
System.out.println("is empty : "+a);
boolean b = num.contains(104);
System.out.println("is 104 in here : "+b);
int c = num.indexOf(104);
System.out.println("104 index is : "+c);
num.set(4, 120);
System.out.println("array: "+num);
int x=num.get(2);
System.out.println("after getting : "+x);
num.clear();
System.out.println("after clearing: "+num);
}
}

mhs_
Автор

package startjava;

import java.util.ArrayList;


public class Arraylist {
public static void main(String[] args) {
ArrayList<Integer> num = new ArrayList<Integer>();
System.out.println(" "+num.size());
num.add(10);
num.add(20);
num.add(30);
num.add(3, 40);
System.out.print(" "+num);
System.out.println();
System.out.println("size : "+num.size());
boolean check = num.isEmpty();
System.out.println("check : "+check);
boolean contain = num.contains(num);
System.out.println("contain in arraylist : "+contain);
int pos = num.indexOf(40);
System.out.println("position in the arraylist : "+pos);
num.set(3, 50);
System.out.println("arraylist contains in 3 index : "+num);

}

}

sitanath
Автор

package newpackage;

import java.util.ArrayList;


public class ArrayList2 {
public static void main(String[] args) {
ArrayList<Integer> num = new ArrayList<>();
num.add(30);
num.add(32);
num.add(34);
num.add(36);
num.add(38);
System.out.println("Array List Contains : "+num);
System.out.println();
System.out.println("Size is : "+num.size());

boolean b = num.isEmpty();
System.out.println("ArrayList is : "+b);

boolean c = num.contains(32);
System.out.println("32 is in the List : "+c);

int position = num.indexOf(34);
System.out.println("The Position is : "+position);

num.set(3, 30);
System.out.println("After Setting : "+num);

int A = num.get(2);
System.out.println("Index of 2 is : "+A);

}
}

tomabanik
Автор

What is the difference between clear () ; and removeAll(); ?

abdullahofficial
Автор

package basicjava;

import java.util.Scanner;
import java.util.ArrayList;
public class ArrayList2 {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
ArrayList<Integer>a = new ArrayList <Integer> ();
System.out.print("Enter how many number you want : ");
int n=input.nextInt(), x;
System.out.print("Enter the values : ");
for (int i = 0; i < n; i++) {
x=input.nextInt();
a.add(i, x);
}
System.out.println(a);
}
}
Sir, is this method is effective?

linkonahad
Автор

package classofarray;

import java.util.ArrayList;

public class ArrayListTwo {

public static void main(String[] args) {
ArrayList<Integer> number = new ArrayList<>();

number.add(23);
number.add(56);
number.add(34);
number.add(90);
number.add(12);
number.add(3, 58);
System.out.println(number + " ");
number.set(2, 45);
System.out.println("Set the value of index 2 : " + number);

boolean b = number.isEmpty();
System.out.println(b);

boolean c = number.contains(30);
System.out.println(c);

int position = number.indexOf(12);
System.out.println("Index of 12 is : " + position);

number.clear();
System.out.println(number);
}

}

elorabarua