Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Threads calling static and non-static method

  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Threads calling static and non-static method

    One class having two method one as static n another as non-static, 2 threads are there t1 is accessing the static method and t2 the non-static method is it possible n both are sharing the same object.

    P.S.
    I now we have two kinds of lock one is object level lock and another is class level lock


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Threads calling static and non-static method

    is it possible n both are sharing the same object.(?)
    What object?

Similar Threads

  1. Calling A Public Static Void Method from Main
    By Clubs in forum What's Wrong With My Code?
    Replies: 2
    Last Post: September 27th, 2013, 02:29 AM
  2. Replies: 6
    Last Post: May 3rd, 2013, 04:25 PM
  3. [SOLVED] Calling a non-static method outside the package without using extends
    By iamhealed in forum Java Theory & Questions
    Replies: 6
    Last Post: September 8th, 2012, 11:04 PM
  4. Replies: 1
    Last Post: February 14th, 2012, 07:42 AM
  5. Replies: 10
    Last Post: September 6th, 2010, 04:48 PM