JAVA 2018 Old Paper Solutions

 Year 2018 Q.no 11 import java.util.Scanner; public class matrix { public static void main(String args[]){ int i,j = 0,s=0; int a[][]=new int[2][3]; Scanner sc=new Scanner(System.in); System.out.println(“enter the elements in matrix”); for(i=0;i<2;i++){ for(j=0;j<3;j++){ a[i][j]=sc.nextInt(); s=s+a[i][j]; } } System.out.println(“sum=”+s); } } Q.no 13 import java.util.*; import java.lang.*; abstract class Y2018q13 { abstract void putdata(String b, int a, […]

Continue Reading