Home TechnologyProgrammingJava Subscribe to RSS

Can I Access The Private Members Of Another Class In Java?

Answer Question

3 Answers - Sort by: Date | Rating

    No, you can't.  This is because private is a keyword that means a variable or method which is only accessible within its class
    0 0

    Zygrax 

    answered 3 years ago

      Yes u can access the private members of a class to other class with the help of methods and classes defined in java.lang.reflec package
      0 0
      Guest

      Guest 

      answered 8 months ago

        Yes u can by friend function
        0 0
        Guest

        Guest 

        answered 8 months ago

        Answer Question - Answers are editable for 5 min.

        If you do not Sign-in or Register your answers will be anonymous,

        your answers may also be checked before going online.

        More

        More

           
           

          Ask a Question via Twitter

          Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

          Blurtit Store

          Get T-shirts, hoodies, caps and more at the Blurtit store

          Blurtit International