How to put "(" and ")" in String

I need to construct a String like: String a="hello"; String b="John"; String s=a+"("+b+")"; this not working since "(" and ")" doesn't recognized as a string,what is the escape character for "(" and ")"?

Why not??? It works for me!!!
     public static void main(String arg[]) {
          String a = "Hello";
          String b = "John";
          String jhonzhang = a + "(" + b + ")";
          System.out.println(jhonzhang );
     }No escape character is required for "("

Similar Messages

  • How do I put and sort string data into an array?

    I have a txt file that has the following sample data:
    Sample.txt----
    Jones Bill 12,500 Salesperson
    Adams Frank 34,980 Manager
    Adams John 23,000 Salesperson
    Thompson Joe 59,500 Trainee
    I need to incorporate each line of data into an individual array element, while using a user-defined method
    (ex. setAllValues(String last, String first, String salary, String job)
    How do I loop the data into the array to be displayed and what is the best way to do sorts on this sample data. Any code or clues would be super helpful.
    Sanctos

    If you set up an array of Strings you can use the java.util.Arrays.sort() method to sort it. If you need to sort arbitrary Objects (i.e. your 3 strings as a whole entity) your 3-way object will have to either implement Comparable or you could write a Comparitor class to do the ordering. Not much to it, though.
    Dom.

  • How to put and burn two diaporama WITH DIFFÉRENT SOUND TRACK on one D,V,D

    I HAD A BIG PROBLEM! I HAVE MADE TWO chapters DIAPORAMA OF a band realated the history of the band. and i want to put them one one DVD .tHEY HAVE DIFÉRENT SOUND TRACK.
    My problem, is when i burn the Dvd only one show ? I use 1 video line and sound track and the second chapter on the video 2 and soundtrack 2 .It d'int make a différence .What did i do WRONG ?

    towline
    What version of Premiere Elements are you using and on what computer operating system is it running?
    Lots of possibilities.
    What do you mean "My problem, is when I burn the DVD only One Show"? Are you saying that instead of having two separate slideshows in DVD-VIDEO, you
    have the two running together as one slideshow?
    What menu markers (Chapter markers) are using - scene markers? Are there stop markers?
    How are your menu menu and scene menu set up?
    One scenario
    Timeline content set up....
    Slideshow 1 with a scene marker at its beginning and a stop marker at its end
    a few seconds gap
    Slideshow 2 with a scene marker at its beginning and NO STOP MARKER AT ITS END.
    (I put that in capital letters because putting a stop marker at the end of the last item of the Timeline 99.99999% of the time creates project failure.)
    With this setup, the viewer is greeted by the main menu and selects from Play Movie or Scene Selection.
    a. If Scene Selection is selected, the viewer is taken to the Scene Selection page where he/she picks a slideshow to watch.
    Important: If the viewer pick Slideshow 1, Slideshow 1 is played and then it reverts back to the main menu.
    b. In this type of scenario, the Play All Button on the main menu becomes meaningless, since selecting it will play only up to the
    stop marker ( end of Slideshow 1) and then revert back to the main menu.
    Alternately, you could create a main menu with the Slideshow 1 or Slideshow 1 choice (use main menu markers) and do away with the
    scene menu. That sounds abstract as written but I can give you how to on that and give you examples.
    First let us see if anything that I have written above has anything to do with what you really asked.
    Thanks. Clarification always available.
    ATR

  • Hwo to put and get data to a mq queue through java

    Hi All
    I would like to know how to put and get messages into a mq series server which is residing on another machine through a java program.
    I do not have a mq client installed in my machine..
    I have WSAD in my machine.... Should i definitely use a JMS for the same?
    PR.

    The MQ client installation is free. You can download it from ibm.com, install it, and refer to the application development documentation that accompanies the installation. I believe there are even sample java programs included in the installation.
    -Scott

  • How to use multiple VCI strings for lap 1300 and 1200 (option 60) in one pool?

    Hi All,
    Hope to you a very happy new year,
    I have two differnt LAP 1300 and 1200 in my network and I need to add theme to the WLC,
    I successed to add one of theme by the option 60 in the DHCP pool at the Core SW,
    So my quetion is below:
    How to use multiple VCI strings for lap 1300 and 1200 (option 60) in one pool?
    Thanks in Advanced,
    Ahmed,

    To add to Scott's post.  Option 60 would be useful if you needed to put certain types of AP on specific controllers.  Otherwise, no real need to use it for the most part.
    Though, I do recall an issue a few years ago that some windows machines had issues getting DHCP if option 43 is being returned.
    Now, on an IOS switch, you can only configure one option 60 per DHCP scope
    HTH,
    Steve
    Please remember to rate useful posts, and mark questions as answered

  • Error message string : cant put and and HTML Blink tag

    Hi All,
    I have experienced a strange problem in the error message string .When i put <abc>.txt as a error message in my validation routine it just truncates abc .
    I think HTMLDB understands it as a HTML tag .
    Any idea how to put open and close angle ?
    And one more question do i put HTML blink tag inside error message ? Its not working ....
    Cheers,
    ROSY

    Try using & lt ; and & gt ; instead (without the spaces inbetween the characters).
    What do you mean by "not working" for the blink question? I'd also suggest that it "not working" is a good thing...blinking text on a website usually looks horrible ;)

  • How to find and replace any string between " "

    Hi everyone,
    Here my sample
    String szTest;
    szTest = "Yellow banana";
    szTest = "Blue monkey";
    szTest = "Red mango";
    szTest is only needed when it's in testing progress. Now I want to put all of that in the /*comment*/ so the released program won't run those code any more (but still keep szTest so I can use it for future develop testing).
    So Here what I want after using the Find and Replace Box:
    //String szTest; //Manual
    /*szTest = "Yellow banana";*/ //use find and replace
    /*szTest = "Blue monkey";*/ //use find and replace
    /*szTest = "Red mango";*/ //use find and replace
    I think I can do this with Regular expressions or Wildcards. But I don't know how to find and replace any string between " and ".
    Find: szTest = " ??Any string?? ";
    Replace with: /*szTest = " ??Any string?? ";*/
    Thanks for reading.

    Hi Nathan.j.Smith,
    Based on your issue, I suggest you can try the Joel's suggestion check your issue again. In addition, I find a MSDN document about how to use the Regex.Replace Method to match a regular expression pattern with a specified replacement string,
    maybe you will get some useful message.
    https://msdn.microsoft.com/en-us/library/xwewhkd1(v=vs.110).aspx
    If the above suggestion still could not provide you, could you please tell me what language you use to create the program for finding and replace any string using regular expression so that we will find the correct programming develop forum to support this
    issue?
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have an ipod touch and i put cds on itunes on my pc , but i cant figure out how to put the music from the cds on my ipod .. can u help me ?

    i have an ipod touch and i put cds on itunes onmy computer , but i cant figure out how to put the music from the cds on my ipod touch can anyone help me?

    ok i select th e music from my music libary and go to file and click sync to my ipod and when it gets to step 3.. it says waiting for changes to be made.. yes the songs play on the itunes ..  and no it wasnt the same computer i used last time

  • How do you transfer the content from an iPhone to a PC? I have to use a PC for a while and don't know how to put my stuff on to there from my phone

    How do you transfer the content from an iPhone to a PC? I have to use a PC for a while and don't know how to put my stuff on to there from my phone

    If you're talking about music and movies an i-device was not designed for unique storage of media. It is not a backup device and media transfer was planned with you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing music and movies is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchases which can be transferred from a device to a computer.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only purchases from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software.  See this document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991

  • How to search a special string in txt file and return it's position in txt file?

    How to search a special string in txt file and return it's position in txt file?

    I just posted a solution for a similar question here:  http://forums.ni.com/ni/board/message?board.id=170​&view=by_date_ascending&message.id=362699#M362699
    The top portion can search for the location of a string, while the bottom portion is to locate the position of a character.  Both can search for a character.
    The position of the character within the file is displayed in the indicator(s).
    R

  • I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    Why not use an event
    Add a While Loop, inside the loop add the Event Sructure.
    Now in the event structure selecd the String Controls.value change event to
    react
    and the new value inside the event that you get,( connect to the String
    indicator box.
    On Sun, 10 Aug 2003 15:58:47 -0500 (CDT), WiltonFilho wrote:
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

  • How to read and write a string into a txt.file

    Hi, I am now using BEA Workshop for Weblogic Platform version10. I am using J2EE is my programming language. The problem I encounter is as the above title; how to read and write a string into a txt.file with a specific root directory? Do you have any sample codes to reference?
    I hope someone can answer my question as soon as possible
    Thank you very much.

    Accessing the file system directly from a web app is a bad idea for several reasons. See http://weblogs.java.net/blog/simongbrown/archive/2003/10/file_access_in.html for a great discussion of the topic.
    On Weblogic there seems to be two ways to access files. First, use a File T3 connector from the console. Second, use java.net.URL with the file: protocol. The T3File object has been deprecated and suggests:
    Deprecated in WebLogic Server 6.1. Use java.net.URL.openConnection() instead.
    Edited by: m0smith on Mar 12, 2008 5:18 PM

  • Help , i have cds on my laptop and i cant figure out how to put them on my iphone

    help i have cds on my laptop and i cant figure out how to put them on my iphone

    Sync them as described in the User's Guide.

  • I tried to sinc my photos and i ended up deleting off my phone all the pictures.  i only ended up with one folder, and i cant figure out how to put rest of folders from my computer back on my phone.....help

    i tried to sinc my photos and i ended up deleting off my phone all the pictures.  i only ended up with one folder, and i cant figure out how to put rest of folders from my computer back on my phone.....help
    and on a second problem.  I need to know for sure that my contacts are backed up on my computer

    Create a parent folder on your computer to store the named folders of photos that you want transferred to your iPhone. Under the Photos tab for your iPhone sync preferences with iTunes, select the parent folder. All named folders of photos within will be transferred to your iPhone as separate folders or albums.
    Regarding your 2nd question, this should be easy. Your contacts should be available on your computer with or without an iPhone or any cell phone, which can be lost or stolen.
    Although contacts are included with your iPhone's backup which is updated by iTunes as the first step during the iTunes sync process, not a good idea to depend on this either since the iPhone backup includes a significant amount of other data. Contacts are designed to be synced with a supported address book app on your computer. With Windoze, this can be with Outlook 2003, 2007, or 2010 along with syncing calendar events and notes, or with the address book app used by Outlook Express with XP and by Windows Mail with Vista and Windows 7 called Windows Contacts for syncing contacts only.

  • I updated my itunes to ios 6.1.3 and now i do not know how to put music on my ipod...someone help!!!

    i updated my itunes to ios 6.1.3 and now i do not know how to put music on my ipod...someone help!!!

    If you  have iTunes 11 turn on the Sidebar. Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
    To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
    To sync to your iPod go to iTunes>Help>iTunes Help>Sync your iPod.... and follow the instructions.

Maybe you are looking for

  • At&t Order Status Question

    My parents ordered an iPhone via the At&t store 7/23. I just checked the order status today but no iPhone 4 order shows up on the page. Does it take this long for At&t to process an order or is there something I'm missing? Thanks. Message was edited

  • Strange characters when receiving mail in mail.app

    Hi, I am having an issue with certain e-mails in mail.app cannot be read due to very strange charachers. I have already seen that problem with entourage and it's just the matter of deleting a font cache but here I cannot seem to get around it.. Any i

  • IWeb Uploads All Pages Everytime

    I have two websites in iWeb.  Normally when I publish, iWeb will only publish the changes made to the various pages.  Lately, everytime I make a little change to any page it reuploads the whole website and when it is done (which takes considerable ti

  • Help with Jar file exception

    I have been following the example of instruction at: http://forum.java.sun.com/thread.jsp?forum=31&thread=332680 But I get an exception when I do the following. D:\pro>jar umf mf.txt myjar.class java.io.IOException: invalid header field         at ja

  • Vison Reboot without HH3 ?

    Hello This has sort of evolved from an initial post in the Infinity section, but may be better placed here: Basically I have swapped out my OR Modem and HH3 for a DrayTek 2850n My setup goes: Connection into houe -> 2850n (In study and hardwired to P