The Artima Developer Community
Sponsored Link

Java Answers Forum
static keyword in java

1 reply on 1 page. Most recent reply: Jan 2, 2004 3:45 AM by raghunandan.n

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
maxima

Posts: 15
Nickname: maxima
Registered: Nov, 2003

static keyword in java Posted: Dec 24, 2003 11:00 AM
Reply to this message Reply
Advertisement
i have seen many times use of static keyword in java program.

Only i know static is a class property. all of the instances would get the same property( of course if i create instances)

but what is the meaning of a static array??

code is something like below...

 static String name[] = { NewYork,Canada,.....,Brazil }
// then here are the code for the Alphabetical Sorting
 

i simply want to know what is job of static here??? plz note i am not creating any instances here.
thanks


raghunandan.n

Posts: 1
Nickname: bhima
Registered: Jan, 2004

Re: static keyword in java Posted: Jan 2, 2004 3:45 AM
Reply to this message Reply
hi maxima
u know that when u create a variable by the name static it
can be shared by all the instances of the class
static array is similar to array in the sence that
u r telling the compiler specifically the data is going to
be the same or unchanged
u know vector is a dynamic array
if u know this u can get the idea
good luck

Flat View: This topic has 1 reply on 1 page
Topic: java class2exe Previous Topic   Next Topic Topic: Self Post Page

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use