Adding "\b" to a string. Please help!

I can't get to add "\b" (backspace) to a string.
When I try to print the string, "\b" shows up as a square.
It's a java applet, and import is "import java.applet.*;"
Please help fast, I appreciate greatly!

I can't get to add "\b" (backspace) to a string.Why would you want to? Why not just delete the last character?
When I try to print the string, "\b" shows up as a square.Print it on what? Clearly on something that doesn't understand backspace.
It all seems pointless to me.
It's a java applet, and import is "import java.applet.*;"Entirely irrelevant except that it tells us this is a GUI, and GUIs don't understand backspaces, and you don't 'print' to a GUI, you display, and why you aren't just deleting the final character remains a mystery.
Please help fastThe speed of the responses here depends on other people's time allocations, not yours.

Similar Messages

  • Sort a string :: Please help.

    Hello Everyone,
    I am having this very simple problem of sorting a String. please help.
         static String sortString(String str){
              List list = Arrays.asList(str);                    
              Collections.sort(list);
              for(int i=0, n=list.size();i<n;i++){
                   System.out.println(","+ list.get(i));
    The function is supposed to take a String and sort it & print it out. This should be simple. Where am I making mistakes? Please help!!

    Hello Everyone,
    I am having this very simple problem of sorting a String. please help.
         static String sortString(String str){
              List list = Arrays.asList(str);                    
              Collections.sort(list);
              for(int i=0, n=list.size();i<n;i++){
                   System.out.println(","+ list.get(i));
                   return str;
    The function is supposed to take a String and sort it & print it out. This should be simple. Where am I making mistakes? Please help!!

  • Pass username and password ADFS without using query string, Please help.

    pass username and password ADFS without using query string, Please help.
    I used query string , but it is unsecured to pass credentials over url, with simple tool like httpwatch , anyone can easily get the password and decrypt it.

    Hi,
    According to your post, my understanding is that you had an issue about the ADFS.
    As this issue is related to ADFS, I recommend you post your issue to the forum for ADFS.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=Geneva
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thank you for your understanding and support.
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Problem in comparision of two strings.please help..

    I am retriving a string password from database and another string from html(user entered one).when i am printing those two strings its printing same strings.But whenever i am comparing strings and printing its not showing equal it is printing as false.what might be the reason.please help me regarding this.Thank you in advance.My cosing is as follows:
    while(rs.next())
    pwd=rs.getString("password");
    System.out.println("pmfg is..."+pwd);
    System.out.println("first string..."+pwd);
    System.out.println("second string..."+loginpwd);
    if(pwd.equals(loginpwd))
    System.out.println("true.....");
    else
    System.out.println("false....");

    once you got two string objects ......forget for where they are comming (database or html0 ....focus on those objects ....do the following
    1) use trim() function on both strings which removes the whitespaces from front and end
    2) use equalsIgnoreCase
    if the problem still persists ....then forget your code and sue the SUN people

  • Converting a long to a string  (PLEASE HELP)

    I am trying to convert a long to a string so that I can put it into a vector. I have this:
    long fileSize = 0;
    String fileModDate = null;
    Vector fileList = new Vector();
         ~~~~~~~
    File [] files = myDir.listFiles();
    for (int i = 0; i<files.length; i++){
    fileSize = files.length();
    String s = fileSize.toString();
    //do the same for the mod date
    fileModDate = files[i].lastModified();
    When i try this, i get an error that long can not be dereferenced. Can anyone please help?

    There are two ways to solve this problem. You are trying to convert a primative type to a string without using its wrapper function (Long). So if you created a long variable as a (Long) object you could call its toString() method and this would work...
    The other way is to simply use the static method in the String class valueOf(long) as follows:
    String longString = String.valueOf(i);Hope this helps.
    Mark

  • Error message when adding video to premiere pro, please help!

    Hi there,
    Every time I try and add a video to premiere pro I get an error message "There was an error decompressing audio or video." I made the video in After effects and it plays just fine but I wanted to add sound to it in premiere pro. The file is mpeg movie, I can get more info if needed, just let me know. I am not very experienced at all in adobe but i'm learning so if someone could please help, that'd be awesome? P.S i'm using a MAC

    You're welcome.
    I've never visited Paris but it is on my list.
    I don't believe the 10.4.4 Update had anything to do with this. I also have a .Mac account and I didn't experience any problems sending with any of my accounts and different SMTP servers after installing the Update.
    Something to try.
    Go to the SMTP server settings for the .Mac SMTP server and in the Server Port field, enter 587 in place of 25 and when finished, select OK to save the changed setting.
    Test if this resolves the problem.
    Having the SSL warning message is odd if Use SSL is not selected for the SMTP server and if using 587 as the server port doesn't resolve the problem, this may be a Mail.app preference file problem which is the file that stores all account settings.

  • Sorting and Searching String (Please help me)

    Hi, Could somn please be of any help here. I am trying to sort this string in alphabetical order and then search for data available but I am not makingprogress with the code. Does anyone have any advise or better still the code to solve this problem... This is hat I have at the moment
    import java.util.*;
    import java.io.PrintStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    public class coursework2
         public static final int MAX_RECORDS = 20;
         public static String lastName[] = new String[MAX_RECORDS];
         public static String firstName[] = new String[MAX_RECORDS];
         public static String telNumber[] = new String[MAX_RECORDS];
         public static String emailAddress[] = new String[MAX_RECORDS];
         public static int read_in_file(String file_name)
              Scanner read_in;
              Scanner line;
              int record_count = 0;
              String record;
              try
                   read_in = new Scanner(new File(file_name));
                   // read in one line at a time
                   read_in.useDelimiter(System.getProperty("line.separator"));
                   while (read_in.hasNext())
                        // Test to see if there are too many records in the file
                        if (record_count == MAX_RECORDS)
                             System.out.printf("Only %d records allowed in file", MAX_RECORDS);
                             System.exit(0);
                        // read in record
                        record = new String(read_in.next());
                        // Split the record up into its fields and store in
                        // appropriate arrays
                        line = new Scanner(record);
                        line.useDelimiter("\\s*,,\\s*");
                        lastName[record_count] = line.next();
                        firstName[record_count] = line.next();
                        telNumber[record_count] = line.next();
                        emailAddress[record_count] = line.next();
                        // Increment record count
                        record_count++;
              catch (FileNotFoundException e)
                   e.printStackTrace();
              return record_count;
         public static void write_out_file(int no_of_records, String filename)
              PrintStream write_out;
              int counter;
              try
                   // Create new file
                   write_out = new PrintStream(new File(filename));
                   // Output all reacords
                   for(counter = 0; counter < no_of_records; counter++)
                        // Output a record
                        write_out.print(lastName[counter]);
                        write_out.print(",,");
                        write_out.print(firstName[counter]);
                        write_out.print(",,");
                        write_out.print(telNumber[counter]);
                        write_out.print(",,");
                        write_out.println(emailAddress[counter]);
                   // Close file
                   write_out.close();
              catch (FileNotFoundException e)
                   e.printStackTrace();
         // Your 'functions' go here
         //This code sorts out the record after loaded into alphabetical order using
         //the selection sort method
         public static void sort()
         // Your 'main' code goes here
         //The code below uses a binary search method to search for record because
         //record have been sorted and this would make search faster and more efficient
         public static boolean linearSearch(String strFirstName, String strLastName)
              //Set-up data_input and declare variables
              //This linear search searches for record in the contact application.
              //Search for a record using surname only
                   int i = 0;
                   boolean found = false;
                   while (!found && i < lastName.length)
                        if(strFirstName.equals("") && strLastName.equals(""))
                             return true;
                        if(lastName.equalsIgnoreCase(strLastName)){
                   //List records from surname only
                   System.out.println("Enter your search criteria (last name only):");
                        System.out.print(lastName[i] +     "\t" + firstName[i] + "\t" + telNumber[i] +"\t" + emailAddress[i]);
                        System.out.println("");
                        if (lastName[i].compareTo(strLastName) == 0)
                             //Compare the last name values and type to make sure they are same.
                             found = true;
                                  i++;
                                  System.out.print(lastName[i] +     "\t" + firstName[i] + "\t" + telNumber[i] +"\t" + emailAddress[i]);
                                       System.out.println("");
                             return found;
              //Search for a record using first name only
         public static void main(String[] args)
              // Set-up data input
              Scanner data_input = new Scanner(System.in);
              // Declare Variables
              int number_of_records;
              String filename;
              int counter;
              // Get filename and read in file
              System.out.print("Enter the masterfile file name: ");
              filename = data_input.next();
              number_of_records = read_in_file("data2.dat");
              //Get new filename and write out the file
              System.out.print("Enter new masterfile file name: ");
              filename = data_input.next();
              //System.out.println("Enter your search criteria (first or last name):");
              linearSearch("*", "");
    Am very sorry this is long, the file should be sorted after it is loaded and I have that, You can make up some data with last ane, first name, tel and email to show me an example. Thanks alot
    Joseph

    Hi Monica, Thanks for you patience with me.
    I have tried writing a selection sort method but am having some errors. Could you kindly have a lookand correct me please.
    This is the code i wrote
    public static void selectionSort(Comparable [] data)
              String strFirstName;
              String strLastName;
              Comparable temp;
              for(int i = 0; i < lastName.length; i++)
                   lastName = index;
                   for (int j = i; j < lastName.length; j++)
                        if (lastName[j].compareTo(lastName) < 0)
                             lastName[j] = lastName[i];
                   //Swap the string values
                   temp = lastName[j];
                   lastName[j] = lastName[i];
                   lastName[i] = temp;
    As you requested, below are 4 error messages I had
    E:\coursework2.java:101: cannot find symbol
    symbol : variable index
    location: class coursework2
                   lastName = index;
    ^
    E:\coursework2.java:107: cannot find symbol
    symbol : variable j
    location: class coursework2
                   temp = lastName[j];
    ^
    E:\coursework2.java:108: cannot find symbol
    symbol : variable j
    location: class coursework2
                   lastName[j] = lastName[i];
    ^
    E:\coursework2.java:109: incompatible types
    found : java.lang.Comparable
    required: java.lang.String
                   lastName[i] = temp;
    ^
    4 errors
    JCompiler done.
    JCompiler ready.
    Joseph

  • Adding binary numbers in java please help!!

    Hello all, im a total newbie to java and i need your help urgently, i have two variables
    that are integers, that store binary numbers i.e.
    int tmpIntOne, tmpIntTwo;
    tmpIntOne = 1010;
    tmpIntTwo = 1110;
    i want to add these numbers together and return a binary result so far when you add them together you get:
    2120
    however i would like a binary result so that
    result = tmpIntOne + tmpIntTwo;
    = 11000
    Thank you.

    Hello all, im a total newbie to java and i need your
    help urgently, i have two variables
    that are integers, that store binary numbers i.e.
    int tmpIntOne, tmpIntTwo;
    tmpIntOne = 1010;
    tmpIntTwo = 1110;These are not binary numbers. These are decimal numbers whose digits consist of ones and zeros. If you want to interpret the characters "010" as a binary number, then do
    int tmp1 = Integer.parseInt("1010", 2);
    etc.
    i want to add these numbers together
    int result = tmp1 + tmp;
    and return a
    binary result Adding two ints will give an int. Int's are always binary. If you want to display it as a binary String, as opposed to the usual decimal String, then, as suggested, use toBinaryString.

  • Compairing strings please help

    how would i compare this string to an int:
    if(response.equals (1))
                                            System.out.println("good choice");
         else
                                            System.out.println("please enter 1 , 2 ,3 as your answer");
         }

    At the risk of stating the obvious, your not comparing strings.
    if(response.equals(1) ) // is wrong!
    it should be
    if ( response.equals("1") )
    It might help if you read the documentation on the equal() method in java.lang.String

  • Compilation Error while using string (Please help)

    Hi,
    I am using "Sun WorkShop Compiler C++ SPARC Version 5.000". Compiling code which contains a "string variable" throws the following error:
    "/opt/WS5/SC5.0/include/CC/./new", line 32: Error: The prior declaration for ope
    rator new(unsigned) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 34: Error: The prior declaration for ope
    rator delete(void*) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 36: Error: The prior declaration for ope
    rator new[](unsigned) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 38: Error: The prior declaration for ope
    rator delete[](void*) has no exception specification.
    4 Error(s) detected.
    The command used for compilation is :
    /opt/WS5/bin/CC -compat=4 -I/opt/WS5/SC5.0/include/CC -features=%all try.cpp
    Would help if I could get some comments on the above.
    Thanks and Regards,
    M Shetty

    There is a requirement that I use the Workshop 5.0
    compilere with option "-compat=4".
    The program I am trying to compile contains:
    #include <string>
    int main()
    string test = "aaa";
    return 0;
    There is no "string" in "-compat=4". You need to
    do something like this:
    // --- start test.cc ---
    #include <rw/cstring.h>
    int main()
    RWCString test = "aaa";
    return 0;
    // --- end test.cc ---
    CC -compat=4 -library=rwtools7 test.cc

  • TS3899 Can't send or receive email on iPhone 5 nor my iPad 2?  Tried hard resetting, deleting account then adding again-- no luck!  Please help!!

    CAn someone please tell me how to fix my email problem-- all of a sudden I can't receive or send email-- it's an Apple problem-- cause I can get online-- tried the hard reset and deleting account and adding again-- no luck
    thanks
    mary

    you still didn't answer the question.... unless you mean to say that you have an AT&T e-mail account. (e.g. @att.net)
    If that's what you mean, they use Yahoo for e-mail services. Yahoo's mail servers are notoriously bad. This comes up here at least several times a week. The problem is on the Yahoo end. Trust me, the AT&T rep you spoke to doesn't know what they are talking about. Removing and re-adding the account increases the odds that you will actually hit a working server, but it's not guaranteed to do so.
    Set up a gmail account or iCloud account and consider switching.

  • URGENT!! Strings - Please help

    Hi
    I am urgently requiring help here. Any help would be greatly appreciated.
    I have a string:
    <clip clipID="{F46F8F95-DB46-4ECE-A44E-5906C7CC60EE}" originalFileName="009033d.rm"
    I need to find the string inside that starts with the first { and ends with the last }
    How do I do this??
    Thanks

    // Escape characters "\" only for this example
    String origString = "<clip clipID=\"{F46F8F95-DB46-4ECE-A44E-5906C7CC60EE}\" originalFileName=\"009033d.rm\"";
    String braketString = origString.substring(origString.firstIndexOf('{') + 1, origString.lastIndexOf('}'));I had to put escape characters in this example since there are quotes in the string. You won't have to worry about that, since I imagine you're getting the string from parsing some page content.
    Hope that helps,
    Mike

  • JMS adapter adding namespace to PIP. Please help!

    Hi Experts,
      I have a XI scenario where 4C1 PIP is being sent to TIBCO.
      The issue is that, the output PIP has a namespace <Pip4C1InventoryReportNotification xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">
      But no where in XI this namespace has been specified. I suspect that this namespace is getting added in JMS adapter side.
      Can this namespace be easily removed in JMS adpter so that PIP element is generated as <Pip4C1InventoryReportNotification> ? If Yes, then how can we do that?
    Thanks & Regards
    Gopal

    From the namespace and the prefix, I guess that the Tibco jms libraries add that namespace. If this is true, you cannot do anything in PI and you have to check, if Tibco can work with that namespace or remove it.
    Regards
    Stefan

  • Please help to remove songs weren't on playlist (and Itunes)!

    Hi all,
    I'm so new to this forum and if this post was in a wrong place, please forgive me!
    I recently added a lot of songs into my Ipod. But today, I found that those songs weren't on my playlists, so I add them again (I don't know why?). Unfortunately, the songs I added yesterday WERE IN MY IPOD but not in Itunes (even in My Ipod Icon in Itunes). So I have many duplicated songs in my Ipod but only one copy in Itunes. Now I want to remove those duplicated songs and ones that present in Ipod hard drive but not appear in Itunes. Please help me to do so.
    (I don't have Itunes Library in my computer since it takes too much space. I found this problem when I use a software to detect duplicated files. Many other songs that I didn't add today but already in my Ipod, and I want to remove those also!)
    This is my 2nd Ipod and I know how to update firmware, adding songs... Please help me to solve this problem since it took about 3GB of wasting space on my Ipod!
    Your helps are greatly appreciated!
    Pardon my English. Have a great day all!
    Saigonian

    Hi Chris,
    Because you said: "The songs can be in any any/all/no playlists.
    On the iPod menu go to Music -> Songs.", but in my Ipod, at the Menu, I just have Playlist and Setting displayed. After your previous post, I try to set more options in the main display and I can't see the "No playlist" display!
    "You already said you had duplicates so go to that song. Sings are in alphabetical order."
    Firstly, with Ipod's tiny screen, are you going to browse one by one to see which songs are duplicated in about more than 300 duplicated files?
    Secondly, And if you found it that way, what can you do in the Ipod itself? Ipod doesn't allow you to delete songs directly from itself. And when you plug it in the computer, run Itunes, those songs are disappeared (I said it didn't show on the Itunes). How can you delete it?
    Thirdly, Those songs are not displayed in Ipod and Itunes! I only can found some duplicated songs via another software which only search for duplicated songs. And for songs that I didn't add in the second time, there's no way that I can find it.
    In this case, I think there's only one solution that having a software to check the intire Ipod's database to find if there's anysong that present in Ipod's hard drive but not in Itunes.
    "iTunes doesn’t rename them when they are put in the iPod. When they are added to iTunes, the file name is the song name. It is stored under the album which is stored under the a artist.
    It’s a very easy, basic and simple way to store them."
    I don't agree with you about this. Mp3 is collected from many sources. Many of them only have "Track 1" or "track n" in the title, and "No artist" or whatever artist etc... When we add it into Ipod, we have to rename it or correct it the way we like.
    And look at the picture below, will you still think that Itunes doesn't remane them when they are put in the Ipod?. In this images, you'll see a long list of folders that stored music in your Ipod. The problem is any song that recently added into Ipod can be stored in folder F00 through Fnn.
    http://img64.imageshack.us/img64/8476/0018px.jpg
    And in this picture, a list of my music added into Ipod. Do you have your music named as 1584, HGNC or something like that? No, I don't think so and I don't think anyone on this earth could name thier music files that way. So, it's clear that Itunes DOES rename those song in it's own way and it's not a good way to handle music!
    http://img97.imageshack.us/img97/4585/0021xy.jpg
    Message was edited by: Saigonian

  • Hi Guys,  I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out

    Hi Guys,
    I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out as this web-site has been payed for by my client.
    Alex

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

Maybe you are looking for

  • Read file from local disk (little bit urgent, thanks)

    Hi all. We're facing a problem using a signed applet. We think it's a matter of versions of the java plugin. The fact is that with version 1.4.0 there's no problem on reading a local file from the applet. Not the same can be said when using version 1

  • Sync photos from two separate iCloud accounts

    How do I sync photos from two separate iCloud accounts onto my PC?

  • E5 Gallery problem

    I have changed my memory card,But it still shows the name of the image file which was in the old memory card.When i am trying to delete,it shows system error. How can i delete that file and cleanup my gallery. It looks very bad,if file name exists wh

  • Downloads fail, redirected to Product Selector? -- SOLUT

    Have you found the download/driver you need, but when you try to download it, you get bounced to the Product Selector ( <http://support.creative.com/welcome.aspx?Referer=~/welcome.aspx?Referer=/Downloads/welcome.aspx> )? Turns out that until you sele

  • Problems with new Sports Tracker 3.50

    Hi, i have tried the Brandnew SportsTracker 3.50. It's a verfy nice App, but i have  some problems: Upload:  After upload to service there are lost some data: - no Energie Data (kCal) -no SpeedMax / Speedmin / Lowestpoit/ Highest Point /  Data -Media