Adding a method to Java class in different file without extending the class -
package com.companyxyz.api.person; public class man { public var1; public var2; ... private static void createauth() { ... } // public methods go here ... }
i want create new public method accesses private method, createauth, in different file. there way create new method without writing or accessing via extended class?
thank you.
no. can't access private method other class. because it's ... private.
Comments
Post a Comment