Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Complete IIT AIEEE ICSE ISC PMT help forum

Complete help forum for students preparing for icse iit aieee cbse pmt and other related exams.Stay updated about all 2011 exams.
 
HomeHome  PortalPortal  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  India NewsIndia News  
Keywords
RESULT question UNION 2009 SELECT 2007 2010 prelim paper CLASS papers CASE computer 2006 YEAR physics science ICSE graph 2004
Latest topics
» Nitration of aniline - IIT JEE 2018 Advanced - solved
program - Program to explain some behaviors of an array EmptyFri Jun 08, 2018 2:34 am by adianadiadi

» Diamagnetic - Paramagnetic - Ni(CO)4, [Ni(CN)4]2- and [NiCl4
program - Program to explain some behaviors of an array EmptyFri Apr 06, 2018 1:05 am by adianadiadi

» IIT JEE chemistry solved interactive question paper
program - Program to explain some behaviors of an array EmptySun Oct 29, 2017 12:11 pm by adianadiadi

» IIT JEE 2015 SOLVED QUESTION PAPER
program - Program to explain some behaviors of an array EmptyWed Oct 19, 2016 1:44 pm by adianadiadi

» IIT JEE chemistry solved questions
program - Program to explain some behaviors of an array EmptySat Jul 18, 2015 6:15 pm by adianadiadi

» General Description of Chinese Market for Foaming Agent ADC
program - Program to explain some behaviors of an array EmptyFri May 09, 2014 2:09 pm by happybaicaitou

» How to get Lowest Cost MBBS Admission?
program - Program to explain some behaviors of an array EmptyMon Feb 24, 2014 6:39 pm by MENTOR 2014

»  girl boy vashikaran specialist agori baba ji +91-9461165
program - Program to explain some behaviors of an array EmptyTue Jan 21, 2014 6:00 pm by krshastri

»  STRONG LOST LOVE SPELL +91-9461165176
program - Program to explain some behaviors of an array EmptyTue Jan 21, 2014 6:00 pm by krshastri

Top posters
abhas
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
Anu..i luv icse...:)
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
G-7
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
siya
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
Candy
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
jOhNy
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
Apurva
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
WinRrule
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
ambili
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 
saif
program - Program to explain some behaviors of an array Vote_lcapprogram - Program to explain some behaviors of an array Voting_barprogram - Program to explain some behaviors of an array Vote_rcap 



Search if you can't find it here

Program to explain some behaviors of an array

View previous topic View next topic Go down
AuthorMessage
saif
Active member
Active member



program - Program to explain some behaviors of an array Vide
PostSubject: Program to explain some behaviors of an array program - Program to explain some behaviors of an array EmptyWed Mar 17, 2010 2:01 pm

class array_try
{
private static int arr[][]=new int[5][5];
private static int arr2[][]=new int[6][7];

public static void main(String args[])
{
System.out.println("Dsplaying details of arr[][]");
System.out.println("row="+arr.length);
System.out.println("column="+arr[0].length);
arr2[5][6]=50;
arr=arr2;
System.out.println("arr[5][6]="+arr[5][6]);
System.out.println("New row="+arr.length);
System.out.println("New column="+arr[0].length);

}
}



OUTPUT
row=5
column=5
arr[5][6]=50
New row=6
New column=7
Dsplaying details of arr[][]
row=5
column=5
arr[5][6]=50
New row=6
New column=7


CONCLUSION


you may change the array size if desired
Back to top Go down
NITIN BHUWANIA
Active member
Active member
NITIN BHUWANIA


program - Program to explain some behaviors of an array Vide
PostSubject: Re: Program to explain some behaviors of an array program - Program to explain some behaviors of an array EmptyWed Mar 17, 2010 8:47 pm

what is this for???

what do we have to do in this program??
Back to top Go down
saif
Active member
Active member



program - Program to explain some behaviors of an array Vide
PostSubject: Re: Program to explain some behaviors of an array program - Program to explain some behaviors of an array EmptyThu Mar 18, 2010 10:02 am

this program shows that you may change the array size if desired and can store the value of an array in another array by arr1=arr2
Back to top Go down
Rabi




program - Program to explain some behaviors of an array Vide
PostSubject: @saif program - Program to explain some behaviors of an array EmptyThu Mar 18, 2010 1:35 pm

hey guys dont u think..dat this logic is nt suitable
by writing arr=arr2;
u r only making the reference of arr point towards arr2
u r nt changing the array length bt u r creating two copies of same arr2 so u loose the original arr
Back to top Go down
G-7
Active member
Active member
G-7


program - Program to explain some behaviors of an array Vide
PostSubject: Re: Program to explain some behaviors of an array program - Program to explain some behaviors of an array EmptyThu Mar 18, 2010 2:20 pm

whatever...! But the point that saif wants top bring out is that arrays are mutable...!! and that it can be copied..! as he has just initialised one position to 50. So..it doesnt matter if we just copied it the ordinary way...!!
Back to top Go down
saif
Active member
Active member



program - Program to explain some behaviors of an array Vide
PostSubject: Re: Program to explain some behaviors of an array program - Program to explain some behaviors of an array EmptyThu Mar 18, 2010 2:21 pm

and yes we will loose the original array arr...
Back to top Go down
G-7
Active member
Active member
G-7


program - Program to explain some behaviors of an array Vide
PostSubject: Re: Program to explain some behaviors of an array program - Program to explain some behaviors of an array EmptyThu Mar 18, 2010 2:22 pm

saif..what is the property that u wish to present over here.?
Back to top Go down
saif
Active member
Active member



program - Program to explain some behaviors of an array Vide
PostSubject: Re: Program to explain some behaviors of an array program - Program to explain some behaviors of an array EmptyThu Mar 18, 2010 2:32 pm

you have rightly guessed.I just wanted to show that "arrays are mutable" and we can do arr1=arr2; we can do same thing with objects....
Back to top Go down
G-7
Active member
Active member
G-7


program - Program to explain some behaviors of an array Vide
PostSubject: Re: Program to explain some behaviors of an array program - Program to explain some behaviors of an array EmptyThu Mar 18, 2010 2:36 pm

yea man...good program..!
Back to top Go down
Sponsored content




program - Program to explain some behaviors of an array Vide
PostSubject: Re: Program to explain some behaviors of an array program - Program to explain some behaviors of an array Empty

Back to top Go down

Program to explain some behaviors of an array

View previous topic View next topic Back to top
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Complete IIT AIEEE ICSE ISC PMT help forum :: ISC :: ISC 2010 [Class xii] :: Computer-