Results 1 to 4 of 4
  1. #1
    eva
    eva is offline Member
    Join Date
    Dec 2007
    Posts
    49
    Rep Power
    0

    Default Declaring global variables

    Hi,

    I have used global variable sin C++. I am new to Java and cannot find the keyword "global" in java. How can I declare global variables?

    My idea is to access that global variable in all the classes in all the packages in my project.

    - PEACE

  2. #2
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    9

    Default

    How to declare global variables in java.

  3. #3
    Join Date
    Dec 2007
    Posts
    24
    Rep Power
    0

    Default

    if u create that as a public then it is availabale to any package man in ur project in java global means public only..

  4. #4
    eva
    eva is offline Member
    Join Date
    Dec 2007
    Posts
    49
    Rep Power
    0

Similar Threads

  1. Global constants
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-17-2008, 10:06 AM
  2. Declaring an ArrayList
    By bugger in forum New To Java
    Replies: 3
    Last Post: 01-31-2008, 08:36 PM
  3. Declaring Vector
    By mew in forum New To Java
    Replies: 1
    Last Post: 12-05-2007, 09:14 PM
  4. Declaring Interface
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-08-2007, 09:41 AM
  5. Declaring Enumeration
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-04-2007, 06:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •