Re: CharAt, I think? Programming Software Development by javaAddict charAt is a method of the String class. In case you … it: [CODE] String s = "abs"; char ch = s.charAt(0); System.out.println(ch); [/CODE] You might want to… loop the String and use the charAt to take each character, using the charAt. Have a new String an initialize it… Re: Please lend a little help....assignment due tonight Programming Software Development by NormR1 charAt is a method in the String class. It is used to get a single character from a String. Re: can someone help to understand this plz Programming Software Development by JamesCherrill CharAt charAt see the difference? ps: full English please - many of our members have English as a second or third language Re: charAt Display Unable to Display Programming Software Development by DaniwebOS … digits: "); input.charAt(0); input.charAt(1); input.charAt(2); input.charAt(3); input.charAt(4); JOptionPane.showMessageDialog(null, input.charAt(0), input.charAt(1)); } } [/CODE… Re: CharAt, I think? Programming Software Development by Akill10 … this code... [CODE]import java.io.*; public class charat{ public static void main (String args [])throws IOException{…out.println("\t "+fname.charAt(0)+ "." +mname.charAt(0)+ "." +lname.charAt(0)+ "."); } …second, you said you had an assignment using charAt method which is very basic. Then you get … charAt Display Unable to Display Programming Software Development by DaniwebOS …: String index out of range: 50 at java.lang.String.charAt(Unknown Source) at PracticeArithmeticOperators.main(PracticeArithmeticOperators.java:12) [CODE]import…;Enter the five digits: "); input1 = Integer.parseInt(input); input.charAt(input.charAt(0)); } }[/CODE] Re: CharAt, I think? Programming Software Development by kumpul101 …! i have this code... [CODE]import java.io.*; public class charat{ public static void main (String args [])throws IOException{ BufferedReader in…;"); System.out.println("\t "+fname.charAt(0)+ "." +mname.charAt(0)+ "." +lname.charAt(0)+ "."); } }[/CODE] Re: charAt Display Unable to Display Programming Software Development by DaniwebOS …: "); for ( int i = 0; i < 5; i++ ) { input.charAt(i); JOptionPane.showMessageDialog(null, input… Re: charAt() but for int's? Programming Software Development by JamesCherrill … having three (or more) questions on the go at once. charAt returns a char, which is a 16 bit integer (see… '0' from each char, ie int n = input.charAt(i) - '0'; // if charAt is '0' n = 0. if charAt is '1' n = 1 Re: CharAt, I think? Programming Software Development by javaAddict … to loop the String and use the charAt to take each character, using the charAt. Have a new String an initialize it… not if you said that you can use only the charAt. Re: CharAt, I think? Programming Software Development by mvmalderen … = 0; i < splitname.length; i++) { char fname = splitname[i].charAt(0); System.out.print(fname + "."); } [/CODE] Can alternatively…" for-loop. for (String n : splitname) { char fname = n.charAt(0); System.out.print(fname + "."); } [/CODE] [/edit] CharAt, I think? Programming Software Development by kumpul101 …; D A O. My instructor said that I will use `CharAt()` ... is it true?? how can I use it???. kindly explain… Re: CharAt, I think? Programming Software Development by kumpul101 …;; System.out.println("Find character in string :"+abc.charAt(3)); } } [/CODE] I got this code from the internet, the… Re: CharAt, I think? Programming Software Development by kumpul101 … = 0; i <= name.length(); i++){ char fname = splitname[i].charAt(0); System.out.println(fname); } } }[/CODE] with an output of… Re: CharAt, I think? Programming Software Development by kumpul101 ok, my fault.. i figured it out... i changed `<=` into `<` ..' because i declared `i` as 0... so i have to use i less than the length of the splitname variabel.. my loop is this.. [CODE]for (int i = 0; i < splitname.length; i++){ char fname = splitname[i].charAt(0); System.out.print(fname+ "."); }[/CODE] CharAt and GUI Programming Software Development by aungmyohein "aung myo hein" to "nieh oym gnua" how to convert with CharAt GUI JTextField or JOptionPane Re: CharAt and GUI Programming Software Development by woodenduck … on the character at the end of normal rev += normal.charAt(i); } //This sets the text in textbox 2 to the… Re: CharAt and GUI Programming Software Development by stultuske … on the character at the end of normal rev += normal.charAt(i); } //This sets the text in textbox 2 to the… charAt(value) Programming Software Development by matt.harding.14203 … then hit enter."); String binaryNum = kbd.nextLine(); bit0 = binaryNum.charAt(0); System.out.println(bit0); The output of bit0 is… charAt() but for int's? Programming Software Development by matt.harding.14203 I have a 8 digit number that is an int, and would like to know if there is an equivalent method that i could use on it like charAt(). or a way to take just one digit out so that it is still an int value and be able to add, multi, etc. Re: charAt() but for int's? Programming Software Development by 1stDAN … int figAt(long number, int pos){ return String.valueOf(number).charAt(pos) - '0'; } public static long figDel(long number, int pos… how to add the charAt()? Programming Software Development by intes77 charAt(0)+value.charAt(1); char Day=value.charAt(3)+value.charAt(4); char Year=value.charAt(6)+value.charAt(7)+value.charAt(8)+value.charAt…} } }[/CODE] Hello i need help about combing the charAt()'s for example i would input 05/05/2010 i…to separate them into Month, Day and Year using charAt() method so that i could display them again. … HELP: What's wrong with this? str[counter].toUpperCase(charAt(0)) Programming Software Development by Johannady2 … myfirstarray*/ } char firstletter0 = word[0].charAt(0); char firstletter1 = word[1].charAt(0); char firstletter2 = word[2].charAt(0); char firstletter3 = word[3… Re: how to add the charAt()? Programming Software Development by kramerd …;"), something like this: [CODE] String Month = "" + value.charAt(0) + value.charAt(1); [/CODE] findInLine(“.”)charat(0); Programming Software Development by nojtb …, c4; c1 = myScanner.findInLine(“.”).charAt(0); c2 = myScanner.findInLine(“.”).charAt(0); c3 = myScanner.findInLine(“.”).charAt(0); c4 = myScanner.findInLine(“.”).charAt(0); System.out.print… output of pots but im wondering what this part does charAt(0); at what would happen if i changed it to… Re: how to add the charAt()? Programming Software Development by apines If you are not forced to use charAt() (assignment restrictions, etc') I recommend a different approach - using [URL=&… Re: HELP: What's wrong with this? str[counter].toUpperCase(charAt(0)) Programming Software Development by Johannady2 …output of ## /*Character.toUpperCase(str[counter].charAt(0));*/ ## is a char. I want…counter] = word[counter]; Character.toUpperCase(str[counter].charAt(0));//i changed it like this firstletter[counter]… = word[counter].charAt(0);} System.out.println("\n … Re: HELP: What's wrong with this? str[counter].toUpperCase(charAt(0)) Programming Software Development by Johannady2 …[counter] = prefix[counter].concat(suffix[counter]); firstletter[counter] = word[counter].charAt(0);} System.out.println("\n Entered words are: \n… Re: HELP: What's wrong with this? str[counter].toUpperCase(charAt(0)) Programming Software Development by Johannady2 …[counter] = prefix[counter].concat(suffix[counter]); firstletter[counter] = word[counter].charAt(0); } } public static void firstLetterToUpperCasePrint() { firstLetterToUpperCase(); System.out.println("… Using charAt(i) to compare three consecutive characters Programming Software Development by nova4005 … "rejected". I don't think I can use charAt(i) to compare the three consecutive 1's, but I… (int i = 0; i < input.length(); i++) { if (input.charAt(i) == '111') validBinary = true; if (validBinary == true) { System.out.println…