Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why some java classes starts with underscore(Ex: _Test)

 
Srinivas Palam
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public class Test extends _Test {
Some methods and statements
}
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have never seen some pattern like that.

The only name pattern with _ that I have seen is the JPA Canonical Metamodel.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be because the person who created the class decided to start its name with an underscore. Nothing else. It doesn't mean anything specific in the Java language, although it might mean something in the mind of the person who wrote the class.
 
Rob Spoor
Sheriff
Pie
Posts: 20665
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Likewise, and those end with _, not start with it.
[Edit]In response to Hebert
 
Campbell Ritchie
Sheriff
Pie
Posts: 50217
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Underscores starting names were standard practice in some C/C++ conventions. The corresponding Java convention is in this page, ยง13.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic