• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Need help!

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know what a class declaration is. But what exactly is an object declaration? Can anyone give me an example?
[ December 01, 2007: Message edited by: Xyz Abc ]
 
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amy
Take a look at this How to ask questions on JavaRanch
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amy Cha:
I know what a class declaration is. But what exactly is an object declaration? ...


Actually, I don't think the term "object declaration" is commonly used in Java.

I've seen "object declaration" used to describe memory being allocated for the instance itself (e.g., OOPic), but I've also seen it used to describe memory being allocated only for a reference (e.g., Willamette University lecture notes). So there seems to be some confusion other this term.

I think it's more common (and clear) in Java to say that we declare variables that reference objects that we "create" or "instantiate."
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ahmed Yehia:
...Take a look at this How to ask questions on JavaRanch


I think this refers to Use a Meaningful Subject Line. "Need help!" (with an exclamation point) isn't very descriptive.
 
Xyz Abc
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry about that. I am new here.
 
Xyz Abc
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[QB]I know what a class declaration is. But what exactly is an object declaration? Can anyone give me an example?
Thanks.
 
Sheriff
Posts: 67682
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Xyz Abc", you have previously been warned on multiple occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional, and this is your final warning. Adjust your display name to comply with the required standards prior to your next post.

Failure to comply will result in the removal of your account.

bear
JavaRanch Sheriff
 
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Xyz Abc:
[QB]I know what a class declaration is. But what exactly is an object declaration? Can anyone give me an example?
Thanks.



It'll help if you can cite the source you read this term from, or describe the context in which you heard it used. As Marc said above, Java programmers don't really use the term "object declaration". Instead, you're most likely talking about either declaring a reference variable or instantiating a class--but it's hard to tell unless you provide more info.
 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic