define single dimension array in java and give it values


الأجوبة

ابحث عن مسائل برمجة جافا | Java programming بالانجليزي

	    int b[]={4,7,9,3,5};//define single dimension array and give it values directly
	    int c[]=new int[5];//define single dimension array and determine number of elements inside it.
	    c[0]=4;//put a value of 4 inside the first element of array c (the address of first element of any array is 0)
	    c[1]=7; //put a value of 7 inside the second element of array c 
	    c[2]=9;
	    c[3]=3;
	    c[4]=5;
	    int b[]={4,7,9,3,5};//define single dimension array and give it values directly
	    int c[]=new int[5];//define single dimension array and determine number of elements inside it.
	    c[0]=4;//put a value of 4 inside the first element of array c (the address of first element of any array is 0)
	    c[1]=7; //put a value of 7 inside the second element of array c 
	    c[2]=9;
	    c[3]=3;
	    c[4]=5;

القوائم الدراسية التي ينتمي لها السؤال

محتاج مساعدة؟ تواصل مع مدرس اونلاين الان!