Advertisement

635 organizations, including eBay, Ericsson and Lockheed Martin, now work smarter with Corporate Accounts. Save up to 42%

 

Welcome! Let me know if you need help using the site or assistance with non-technical questions.

 
Time Tested Java Solutions: 1 - 25 of 10253
 
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’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 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 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'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...
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...
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 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...
Hi I need to convert a string to integer but before cnverting I need to check if there is no letters. Thanks
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, 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 ...
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...
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...
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 =...
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(); ...
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...
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 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 program to encrypt and decrypt a file using AES encryption standard. It works fine within the same class. Now I want to implement the same in different classes in different machin...