• Post Reply Bookmark Topic Watch Topic
  • New Topic

Forward reference

 
Michael Angstadt
Ranch Hand
Posts: 277
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YES THIS MAKES TOTAL SENSE. GO SUN.
 
Henry Wong
author
Sheriff
Posts: 22532
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Angstadt wrote:YES THIS MAKES TOTAL SENSE. GO SUN.


Yea. The compiler is not very good in this regard. It can be tricked easily by using a reference.

Henry
 
Michael Angstadt
Ranch Hand
Posts: 277
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It just seems like it would make more sense just to not allow a field to be used at all until it is declared. But who knows.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15715
73
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java programming language was originally designed to be appealing to C++ programmers, and so it inherited large parts of its syntax and semantics from C++, where it probably works in a similar way.
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,
You can find forward reference in JLS. See JLS
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!