This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to hide characters in a string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to hide characters in a string" Watch "How to hide characters in a string" New topic
Author

How to hide characters in a string

Ron Ingram
Ranch Hand

Joined: Mar 11, 2011
Posts: 63
Hello,

String storeVal = rs.getString(5)+","+rs.getInt(2);

= "stringValue,10"

I want to add this value to populate a java.awt.Choice box. However, I want to hide the ",10". Any ideas?

Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3056
    
  33

I would just use rs.getString(5)

Can you please post correct code? I think rs- is a reference to ResultSet.


Mohamed Sanaulla | My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to hide characters in a string
 
Similar Threads
Overcome hiding method for static--pls help
JTable
Problem in Password encryption
show/hide formfields
How to open a hidden command window