Core Java - Assignment #6 | Core Java | Java Programming |

preview_player
Показать описание
In this video, I have explained about "Core Java - Assignment #6".

Programs explained in this video:
❇️ Print the sum of the elements of a multidimensional array
❇️ Add the elements of two arrays and print the output array in the console
❇️ Create an array with squares of the existing array elements
❇️ Print the common elements between two arrays
❇️ Create an array based on the mentioned conditions and print it in the console
❇️ Interchange the values of an array by transposing the index values

🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶

===================================
===================================
Connect me @
===================================
===================================
🙏 Please Subscribe🔔 to start learning for FREE now, Also help your friends in learning the best by suggesting this channel.

#hyrtutorialstelugu #selenium #java #telugu
Java programming by Yadagiri Reddy
Рекомендации по теме
Комментарии
Автор

Sir, yours way of telling is superb, thanks for your valuable time spending for us, keep doing tutorial's like this 🤗🤗🤗🤗🤗🤗🤗🤗

srinivasjesus
Автор

Super sir assignments are very help full to practice

Competitiveexams-zkpn
Автор

Thank you sir, it's a great explanation, no one is explaining like you, please upload remaining concept vedios in java

sureshtirumalasetti
Автор

Thank you bro please continue uploading videos

pathanahmedkhan
Автор

4th answer which took 1 hour for me 😮‍💨is here :
java.util.Scanner;
public class arrays7 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("enter array1 row size");
int arrsiz1r= sc.nextInt();
System.out.println("enter array1 coloumn size");
int arrsiz1c=sc.nextInt();
int [][]arr1=new int[arrsiz1r][arrsiz1c];
System.out.println("enter array1 values");
for(int i=0;i<arrsiz1r;i++){
for(int j=0;j<arrsiz1c;j++){
arr1[i][j]=sc.nextInt();
}
}

for (int i = 0; i < arrsiz1r; i++) {
for (int j = 0; j < arrsiz1c; j++) {
System.out.print(arr1[i][j] + " ");
}
System.out.println();
}
System.out.println("enter array2 row size");
int arrsiz2r= sc.nextInt();
int[][]arr2=new int[arrsiz2r][];
for(int i=0;i<arrsiz2r;i++){
System.out.println("enter array2 column size");
int arrsiz2c=sc.nextInt();
arr2[i]=new int [arrsiz2c];
System.out.println("enter array2 values");
for(int j=0;j<arrsiz2c;j++){
arr2[i][j]=sc.nextInt();
}
}

for (int i = 0; i < arrsiz2r; i++) {
for (int j = 0; j < arr2[i].length; j++) {
System.out.print(arr2[i][j] + " ");
}
System.out.println();
}
boolean[][]varr1=new boolean[arrsiz1r][arrsiz1c];
boolean Found=false;

for(int i=0;i<arr1.length;i++){
for(int j=0;j<arr1[i].length;j++){
int element1=arr1[i][j];
if(varr1[i][j]){
continue;
}
Found=false;
for(int k=0;k<arr2.length;k++){
for(int l=0;l<arr2[k].length;l++){
int element2=arr2[k][l];
if(element1==element2){
Found=true;
break;
}
}
if(Found)
break;
}
if (Found)
{
System.out.println(element1);
for(int m=0;m<arr1.length;m++){
for(int n=0;n<arr1[m].length;n++){
int element3=arr1[m][n];
if(element1==element3){
varr1[m][n]=true;
}
}
}
}
}
}
sc.close();
}
}

THALA--
Автор

assignments helped me a lot, thank you sir🙂

devavenkat
Автор

instead of using so many for loops you can write like this :
import java.util.Scanner;
public class numbers5 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("enter array row size");
int arrsizr= sc.nextInt();
System.out.println("enter array coloumn size");
int arrsizc=sc.nextInt();
int [][]arr=new int[arrsizr][arrsizc];
System.out.println("enter array values");
int sum=0;
for(int i=0;i<arrsizr;i++){
for(int j=0;j<arrsizc;j++){
arr[i][j]=sc.nextInt();
sum+=arr[i][j];
}
}
System.out.println("input:");
for (int i = 0; i < arrsizr; i++) {
for (int j = 0; j < arrsizc; j++) {
System.out.print(arr[i][j] + " ");
}
System.out.println();
}

sc.close();
}
}

THALA--
Автор

Thank you soo much sir do please continue this course

SureshK-edyi
Автор

Thank you sir. It's very useful to me. 🤝🥳🥳

srinadh
Автор

int[][] a = new int[3][2];
a[0] = new int[] {1, 2, 3, 4};
We can insert more than declared 2 elements in every single array .. no array out of bound exception while accessing as well...

mohanramakrishnakonijety
Автор

Sir please cover all topic in core java sir

chandhunaidu
Автор

Sir, Transpose ki meeru rasina code 3*3 or 2*2 matrix alantivi vatike matrame execute avutunidi.
Nenu 3*2(3 by 2) matrix input isthe Naaku 2*3 output ravali kada. E code tho error vasthundi. Nenu elane rasanu.
Please respond sir

AjayKumar-ifuf
Автор

Very well explained sir. Duplicate elements how to print only once 4th assignments adhi ardhamkaledhu sir. Tired but wrong output

supriyagundra
Автор

last question ki continuation cheppandi sir.Tried very but cannot get it

surakantidivyanjali
Автор

Inko If theeskuni dhanlo ! Contains Condition pedithey print chesthey saripothundi sir, appudu already print ayina number radhu

karunrk
Автор

hello sir please make a video on fundamental of data structure your explanation makes us to understand easily

saikrishna-wmjv
Автор

6th answer in my way:
import java.util.Scanner;
public class arrays6 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("enter array row size");
int arrsizr= sc.nextInt();
System.out.println("enter array coloumn size");
int arrsizc=sc.nextInt();
int [][]arr=new int[arrsizr][arrsizc];
System.out.println("enter array values");
for(int i=0;i<arrsizr;i++){
for(int j=0;j<arrsizc;j++){
arr[i][j]=sc.nextInt();
}
}
System.out.println("input:");
for (int i = 0; i < arrsizr; i++) {
for (int j = 0; j < arrsizc; j++) {
System.out.print(arr[i][j] + " ");
}
System.out.println();
}
int arr2[][]=new int[arrsizr][arrsizc];
for(int i=0;i<arrsizr;i++){
for(int j=0;j<arrsizc;j++){
arr2[i][j]=arr[j][i];
}
}

for(int i=0;i<arrsizr;i++){
for(int j=0;j<arrsizc;j++){
System.out.print(arr2[i][j]+" ");
}
System.out.println();
}
sc.close();
}
}

THALA--
Автор

Sir, for the last assignment is it possible to reverse a jagged array

LikeMindzz
Автор

Hi bro, I am learning java from your videos. I have one doubt.

Can we Get number of Multi dimension arrays that user wants at console level for adding elements??

VENKATESHARATHALA
Автор

3rd question in my own way:
import java.util.Scanner;
public class numbers6 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("enter array row size");
int arrsizr= sc.nextInt();
System.out.println("enter array coloumn size");
int arrsizc=sc.nextInt();
int [][]arr=new int[arrsizr][arrsizc];
System.out.println("enter array values");
for(int i=0;i<arrsizr;i++){
for(int j=0;j<arrsizc;j++){
arr[i][j]=sc.nextInt();
}
}
System.out.println("input:");
for (int i = 0; i < arrsizr; i++) {
for (int j = 0; j < arrsizc; j++) {
System.out.print(arr[i][j] + " ");
}
System.out.println();
}
int arr2[][]=new int[arrsizr][arrsizc];
for(int i=0;i<arrsizr;i++){
for(int j=0;j<arrsizc;j++){

}
}

for(int i=0;i<arrsizr;i++){
for(int j=0;j<arrsizc;j++){
System.out.print(arr2[i][j]+" ");
}
System.out.println();
}
sc.close();
}
}

THALA--