You are on page 1of 2

Department of Electronics & communication Engineering

Quiz 01
Course Information
Course Title: Object Oriented Programming
Course code: ICE107
Section: 01
Course Instructor: Mohammad Rafsun Islam
Student Information
Name: Rafat Hasan Dipu
ID: 2020-1-50-042

Submitted to: Submitted by:


Mohammad Rafsun Islam Rafat Hasan Dipu

Date: 19-07-2020
Code: package helloworld;

public class Multiarray2 {

public static void main(String[] args) {


int k=0;
int B[][]=new int [4][];
B[0]=new int[6];
B[1]=new int[3];
B[2]=new int[4];
B[3]=new int[5];

for(int i=0; i<4; i++) {


for(int j=0; j<B[i].length; j++) {
B[i][j]=k;
k+=2;
}
}
for(int i=0; i<4; i++) {
for(int j=0; j<B[i].length; j++)
System.out.print(B[i][j]+ " ");
System.out.println();
}

Output

You might also like