Results 1 to 2 of 2
- 04-09-2010, 09:24 AM #1
Member
- Join Date
- Apr 2010
- Posts
- 2
- Rep Power
- 0
Specific syntax? java.util.regex.Pattern$Node
Hi,
Thank you for reading my post :) .
I was considering the following package: "java.util.regex",
when I met the following thing:
and also for instance:Java Code:- http://www.docjar.com/docs/api/java/util/regex/[B]Pattern$Node.html[/B] - static class: [B]Pattern.Node[/B] - java.util.regex.[B]Pattern$Node[/B]
=> I am wondering what is that "dollar character" that appears above inJava Code:- http://www.docjar.com/docs/api/java/util/regex/[B]Pattern$Begin.html[/B] - static final class: [B]Pattern.Begin[/B] - java.util.regex.[B]Pattern$Begin[/B]
"Pattern$Node" or "Pattern$Begin".
Is this "$" character a character like any other one?
Or is it a specific construct... ?
=> What is "Pattern.Begin"?
Is it the name of a class with a dot character right in the middle of it?
=> Why do we have those two distinct forms of what appears to be the
same thing "Pattern.Begin" and "Pattern$Begin"?
Thank you for helping me.
All the best,
--
Lmhelp
- 04-09-2010, 11:32 AM #2
Member
- Join Date
- Apr 2010
- Posts
- 2
- Rep Power
- 0
Hi again,
Someone in my office gave me a hint: "nested classes", "inner classes".
Ref. Nested Classes (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
Apparently, "Begin" would be an inner class of the class "Pattern"
which would be the outer class for "Begin".
We probably write "java.util.regex.Pattern$Begin" instead of
"java.util.regex.Pattern.Begin" not to think "java.util.regex.Pattern"
is a package name with a class "Begin" inside...
Sincerely,
--
Lmhelp
Similar Threads
-
How to get value of specific child node
By sito42 in forum New To JavaReplies: 1Last Post: 07-13-2009, 12:00 PM -
How "Pattern.matches(regex, input)" function works?
By kishan in forum Advanced JavaReplies: 2Last Post: 04-26-2009, 12:46 AM -
Regex Pattern/Matcher - Print only one occurrence!
By racha0601 in forum Advanced JavaReplies: 3Last Post: 04-06-2009, 05:05 PM -
how do i print a specific txt file on a specific printer
By nikhilbhat in forum New To JavaReplies: 2Last Post: 11-08-2008, 10:40 AM -
Regex pattern
By ravian in forum New To JavaReplies: 4Last Post: 12-11-2007, 10:20 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks