A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
How to access
Niyas Ahmed Sheikh
Joined: Jun 15, 2005
Aug 04, 2005 03:04:00
Suppose I want to access the class A's method and variables(ofcourse public) from another class B, in which class B doesn't extend the class A.
Simply I want to access the class A, and to create the instances of class A in the class B, without class B extending class A.
For that what are the criteria or rules for it. I think we can do it in package and if so, some example codings will be very helpful.
Mahesh x Bogadi
Joined: Jul 06, 2004
Aug 04, 2005 03:58:00
public class A
public class B
private A a;
subject: How to access
Access a class no package
dynamic access of interface members
access to another classs' elements(variables)?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014