Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
About objeckts state
bob john
Ranch Hand
Posts: 117
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I found this on tutorial book:
the state of the object can be changed
How to understand and what is it? "The state of objeckt".
Counting ob = new Counting (); ob.a = "day" ;
What else can be done?
Liutauras Vilda
Marshal
Posts: 8857
637
I like...
posted 7 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
class Car { double speed = 0; // defines object state public void accelerate() { speed += 20; } public void accelerate(double speed) { this.speed += speed; } }
Car mercedes = new Car(); mercedes.speed = 200; // <-- object state changed mercedes.accelerate(); // <-- changes object state
Jesper de Jong
Java Cowboy
Posts: 16084
88
I like...
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The
state
of an object is the data that the object contains.
Jesper's Blog
-
Pluralsight Author Page
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
java is pass by value????
static objects
Object of Class N declared inside Class N itself.
Implementing ArrayList class manually
java classes accessiblity
More...