-3

Consider the ArrayList below:

static ArrayList<String> credit_num = new ArrayList<String>();

What does it mean to have static before the ArrayList?

Zeke Ackerman
  • 23
  • 1
  • 1
  • 5
  • 1
    I guess we can guess that you're talking about Java, but it may make a difference. Surely you can google "Java static"? – John3136 Nov 29 '16 at 21:41
  • 3
    What is a `static` anything in Java? https://docs.oracle.com/javase/tutorial/java/javaOO/classvars.html – sparc_spread Nov 29 '16 at 21:48

1 Answers1

3

The keyword static before a variable in Java means that it is shared by all instances of that particular Class.

Chetan Jadhav CD
  • 1,116
  • 8
  • 14