Advertisement

Experts have come up with some helpful tips for getting a solution to your problem fast.

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested Java Solutions: 1 - 25 of 9479
 
Hi Iam trying to Conver a String(mm/dd/yyyy) to Date Here is code DateFormat myDateFormat = new SimpleDateFormat(strFormat); Date myDate = null; try {      myDate = myDateFormat.parse(...
Hi,      Below is the class which sorts the list of strings and integers. I passed the arguments as 115R 1125R 147C 37R 57R 37C and it shows the result as 1125R 115R 147C 37C 37R 57R. But ...
How can I conver an integer variable to a String variable? int val1 = 34; String val2 = (String) val1; Above does not work: inconvertible types found   : int required: java.lang.Strin...
How do I  write a method that takes an array of Strings as a parameter and works out a total numerical score. As an example, {"A", "B"} would give a score of 3+2 = 5. The method returns this ...
Hi all,         I have been given a JAR file that is supposed to run. I have got no experience what so ever with Java. I want to know how to run this file???? Following is what I have already...
I've obviously a newbie to java, *ATTEMPTING* to teach myself, but I've run into a problem that's really held me up. As you can see below, I'm attempting to run a java application called "h...
I have run into a problem that I can't seem to find a solution to. my users are copying and pasting from MS-Word.  My DB is Oracle with its encoding set to "UTF-8". Using Oracle's thin d...
Hi all, I’m trying to get the total number of rows return to a result set, aside from manually counting them using while(rs.next()) {count++}, I can’t find any other way, is there a function t...
I'm trying to run the JSF/AJAX example by Tor Norbye (http://blogs.sun.com/roller/page/tor/20050709).  Here is what I've done. - downloaded and installed the AJAX Textfield component (http:...
Hi, is there away to do java switch statment on a string variable? I know it can be done on integer but not strings. any work around if I need to do a switch case statements on a string varia...
Hello experts,  I am not sure how best to sort a vector of objects I made. The objects in the vector is something I made called a LogError with these properties: String date String time...
my qustion is like this compute a method called yearJoined ().this method returns year of the date joined as an int.example for dateJoined 25/2/1999,this method must return the integer value...
Hi I need to convert a string to integer but before cnverting I need to check if there is no letters. Thanks
How can I delay my program between  second functions ? I want to do this because after the first function execute , i need to wait for a moment before some data is received thru internet . Aft...
I intend to convert a integer (or short or long) that is greater than a byte can hold (eg, 1111) to a byte array, since casting is simply cannot be used here, any other way can do it without l...
Hi all ,                  I have xml in the form of a String how do i convert the Xml string into an input stream in java as i would like to do the following builder.build(java.io.InputStrea...
Can i use the .csv file to store my address book information? If yes, how can i read and write the .csv files? What is the benefit of using .csv file than normal .txt file? Is't possible to ma...
Hi, I have this hex string, "1EA23", I would like to put this hex string into a byte array... For example... String hexString = "1EA23"; byte byteArray[] = new byte[4]; the value ...
Hello, I'm using this code fragment to test if an object in a Vector is a double before I access it...                bisNumber = true;                                try { testDouble =...
I am simply trying to create a folder in Java. I have the specified path assigned to a string "document", which will be the name of the folder. (code below) I have looked at the Java A...
Hello, this is my query : String query =      "from MyBank b where "           + "b.institution LIKE UPPER('"           + startsWith + "%')"; I want to add a distinct on the institution field. Thank ...
Hi, working on JDK 1.5 , having following query:      i am converting a string to byte array using the code      byte[] stringToByteArray(String str) {            int length = str.length(); ...
Can anyone tell me internal difference between abstract class and interface. When to use interface and when to use abstract classes?? answer me in detail.. I know basic difference.. ...
Hi there.... I got above error and below are my java files....Pls help me to see what is wrong with my script? I know that my points currently not enough, but i do hope someone will entert...
I have a friend that is also taking a class and is having a problem with the size of his JButtons. All he wants to do is increase the width of the buttons so the lable can fix inside the butto...