J
J
javanub2014-07-07 13:55:26
Java
javanub, 2014-07-07 13:55:26

How to pass an object from one class to another?

1. How are objects passed as parameters to methods?
2. The second question I do not know how to formulate. For example there is 1 class in which there is a field "position". There is a second class, which raises the position to the desired one. But these 2 classes are not related. Also a question about the use of objects.
Show simple examples so that you can understand.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AxisPod, 2014-07-07
@AxisPod

1. as well as standard types
2. but this is impossible to understand without half a liter in principle, in this case it is probably more difficult to understand the question than to explain

V
vlad20012, 2014-07-07
@vlad20012

To be able to understand, read some book, and do not ask stupid questions here. Schildt, for example .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question