• 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

Regex and Generics Notes/Questions

 
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I need help with Regex and Generics, two objectives where my concepts are still weak. I know its a very broad question but if you have some points that I should keep in mind , some notes or some interesting questions on these topics...please post them in this thread.

Any help would be nice.

Thanks,
Megha
 
Ranch Hand
Posts: 652
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Megha,
Check out this link for genericsGenerics
 
megha joshi
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Nik..I saw document...I am looking for something more concise...and to the point ... some bullet points to keep in mind for generics questions

For regex...
First question...
Can someone please explain whats the null string output when using \\w* in regex with string using split. I know there were two threads on this forum on this before but I really dont understand when the null string matches word or ...what are the rules...

Second question...
I wrote the following code...can anyone shed some light on the rationale behind the different outputs from three methods using regex here...


Output:
Split output
><
> <
><
><
Patter Matcher output
0,><
1,>apples<
7,><
Scanner output
> <

Thanks,
Megha
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am currently studying for SCJP ,here are some notes i made on those topics (they are abit quick and dirty). Let me know what you think

http://docs.google.com/Doc?id=dgxbdmcg_2ggwr25

http://docs.google.com/Doc?id=dgxbdmcg_1fvnz3r
[ May 10, 2007: Message edited by: Louis Moloney ]
 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fine Job Louis!

I liked generics stuffs.


Thanks,
 
Nik Arora
Ranch Hand
Posts: 652
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Louis,
Thanks for that nice notes................... Its good send me if you have notes for threads.




 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

How things work.

Have a look at this:


output:
Using "\\." as delimiter in Scanner
--------------------

>abc<
>sr<
>stryr<
>ds<
Using . (delimiter) as delimiter in Scanner
--------------------
><
><
><
><
><
><
><
><
><
><
><
><
><
><
Using .* delimiter in the Scanner
--------------------
Using .* pattern to find
--------------------
0>abc.sr.stryr.ds<
Using .(metacharater) as split delimiter
--------------------
Using Limit parameter to include all blank matches
--------------------
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><


-----------
Thanks,
 
Louis Moloney
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
glad you liked the notes guys. I haven't made any on threads yet, but intend to soonish. I will post them when i do.
reply
    Bookmark Topic Watch Topic
  • New Topic