Trouble with a If conditional using string methods.

Hello Everyone,
I am having trouble with an If statement. I want to compare a string variable to two values using the or operator. I have found the || may not be applied to string.equals. Would neone happen to have a different method? Code below:
check = ("C".equals(option)) || ("F".Equals(option));

jverd wrote:
Please paste in the exact, complete error message.
One thing that's definitely wrong is the capital E in your second Equals. I don't know if that's causing the problem though.Also note that, once you get it to compile, if you don't remove the semicolon after the if statement, you won't get the behavior you want.

Similar Messages

  • I am having trouble with comcast e mail using safari

    I am having trouble with xfinity e mail using browser, SAFARI

    I too had this issue. I was recently an employee and user of Comcast and they do not support Safari. Some functions work, many don't. I used Firefox and had no issues. I also set up my mail using MAC MAIL and didn't have any issues with that.

  • Issue with Capturing Long text using CALL METHOD EDITOR- GET_TEXT_AS_STREAM

    HI Experts,
    Standard Long text is capturing using CALL METHOD EDITOR->GET_TEXT_AS_STREAM
         but not working for Custom Long text – Only changes
    Here is the Issue:
    1)      Created Custom Long text in TAB. --> Good
    2)      Entered few lines in custom Long text  --> Good
             Click on Standard Tab , Leaving Custom tab and Custom Long text-->Good
    4)      In PAI of Custom Tab – Changes captured using CALL METHOD 1 ( See below Code 1)--> Good
    5)      Entered few lines in Standard Long text in Standard Tab -->Good
    6)      Click another Standard Tab
    7)      In PAI of Standard Tab – Changes captured using CALL MEHTOD 2 ( See Below Code 2)-->Good
    8)      Come back to Standard Tab / Standard Long Text , Enter few more lines.
    9)      Change the Tab , IN PAI of Standard Tab/Standard Text , Changes Captured using CALL METHOD2 ( See Below CODE 3) --> Good
    10)   Go to Custom Tab , Custom Long text , Entered few more lines--> Good
    11)   Click on any other tab, Triggered again PAI of Custom tab / Custom Long text using Call Method1 ( See Below Code 4) -->Good triggered PAI same CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM.
    12)   But additional lines are not captured , saying ZERO LINES in Internal Table and IF_MODIFIED = NO  -->Issues lies here.
    CODE1 ( Custom Long text entry capturing – First Few Lines )
    Custom Long text Entries are stored in LS_OUTTAB-TEXT first time when entered few lines and LV_MOD is 1.
    PAI of Custom tab
    CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
            EXPORTING
              ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
            IMPORTING
              TEXT                                       = LS_OUTTAB-TEXT ( FIlled with Lines entered in custom long text )
              IS_MODIFIED            = LV_MOD ( Value 1 , Modified )
            EXCEPTIONS
              ERROR_DP               = 1
              ERROR_CNTL_CALL_METHOD = 2
              OTHERS                 = 3
    CODE2 ( Standard Long Text Entry Capturing – First Few Lines )
    Standard Long text Entries are stored in SELECTED_TEXT first time when entered few lines and FLAG_MODIFIED is 1.
    PAI of Standard tab
       CALL METHOD EDITOR->GET_TEXT_AS_STREAM
          EXPORTING
            ONLY_WHEN_MODIFIED = YTRUE ( Value 1 , Modified )
          IMPORTING
            TEXT                               = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
            IS_MODIFIED        = FLAG_MODIFIED.
    CODE 3 ( Standard Long Text Entry Capturing – Second time Few Lines )
    Standard Long text Entries are stored in SELECTED_TEXT  second  time when entered few lines and FLAG_MODIFIED is 1.
    PAI of Standard tab
       CALL METHOD EDITOR->GET_TEXT_AS_STREAM
          EXPORTING
            ONLY_WHEN_MODIFIED = YTRUE
          IMPORTING
            TEXT                               = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
            IS_MODIFIED        = FLAG_MODIFIED. ( Value 1 , Modified )
    CODE4 ( Custom Long text entry capturing – Second Time Few Lines )
    Custom Long text Entries are not stored in LS_OUTTAB-TEXT Second Time when entered few lines and LV_MOD is 0.
    PAI of Custom tab
    CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
            EXPORTING
              ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
            IMPORTING
              TEXT                                       = LS_OUTTAB-TEXT  ( ZERO ENTRIES )
              IS_MODIFIED            = LV_MOD   ( NOT MODIFIED Flag )
            EXCEPTIONS
              ERROR_DP               = 1
              ERROR_CNTL_CALL_METHOD = 2
              OTHERS                 = 3
    Can anyone help me out of this.
    With Regards,
    Bala M

    Excellent Eitan,
    Here is what I am trying to Achieve.
    In Create Notification IW21 , They need 5 Long Text in Custom Tab ( Say Tab Name is MBR ).
    TAB1 NOTIFICATION Standard Information , TAB2 REFERENCE OBJ , TAB 3 MalFunction , Breakdown Standard one...... TAB 7 ( Custom Tab ).
    In Custom Tab , I added 5 LONG TEXT ( its 5 WHY Concept ).
    When the User enters data in 5 Long text , it should store long text along with Notification number when save.
    But Notification number will be generated @ the time of SAVE , but before that its just shows as
    %0000000001 ( and Number will be generated 1000065479) at Save.
    How to achive this .
    I did this:
    Added 5 Custom Container. and In PBO / PAI
      PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    IN PBO
       CREATE OBJECT TEXT_EDITOR1 ,    CREATE OBJECT TEXT_EDITOR2,    CREATE OBJECT TEXT_EDITOR3 like wise 5
       CALL METHOD TEXT_EDITOR1->SET_TEXT_AS_R3TABLE ,    CALL METHOD TEXT_EDITOR2->SET_TEXT_AS_R3TABLE .. Like wise 5 , So when the user Click on Custom Tab ( MBR ).
    It give 5 Long text.
    When he click tab1 or tab2 or tab3 .. and again tab MBR , still data is available.
    How to store this data for future retrival ( IW22 or IW23 ) ?
    Its working fine when I enter first time and goes here and there and finall save .
    IN SAVE BADI , I imported the Long text and created Standard Text SO10 with Notification Number with LONG1 , LONG2 .. means 1000065479LONG1 as standard text.
    But not working when I entered first time and go to tab1 and tab2 and then to MBR tab and added few more lines , its not exporting full lines and in IMPORT ( SAVE BADI ) giving ZERO Lines.
    Please help and thanks for your quick response.

  • Trouble with video on Skype using lion os

    I am having trouble with video using skype. I can only use the facetime video and can't expand the screen. I have tried removing and reinstalling skype

    use these commands when your are in a video session. (under video) in facetime

  • HT4623 Anyone have trouble with iPhone 5c when using Siri?

    Anyone having with iPhone 5c when using Siri?

    I have a problem when I am using the SIRI and have # contacto, for example mark with siri #995012607.

  • Trouble with mapping CMR field using Sun One Studio

    I am having trouble adding a cmr between 2 entity beans. It is a simple one to one relationship, navigatable in only one direction. In the database I have a foreign key defined between the two tables that store the data for the beans.
    I add the relation by selecting the 2 beans and define it as one directional, one to one , with the name "bb". I then map the relationship field via the properties/As Sun One tab. I use the foreign key defined in the database. All seems to be well.
    Using Sun One AppServer 7 and Studio 4
    Upon deploying the application I receive:
    CMP Mapping Error in bean Sites:: Warning: The field bb is not mapped.
    Set the column mapping for the field.

    The CMR/CMP mappings is very instable.
    Sunone Studio 5 has a lot of bugs when mapping CMP/CMR but i never saw this one, try to upgrade.
    Please vote for this bug. It's killing me!!!!!!!!!!!!!!!
    http://developer.java.sun.com/developer/bugParade/bugs/4932495.html

  • SQL*LOADER Conditional using conventional method

    I need load only the registers that have one determined value,
    using SQL*LOADER with conventional method.
    thanks

    Have you looked at the WHEN clause?
    eg.
    INTO TABLE dept
    WHEN recid = 1
    ( recid ... etc

  • Trouble with primary key in query string

    Switching from asp to php, so working with David Power's book:  The Essential Guide to Dreamweaver CS4 with CSS, AJAX and PHP.  Retraining my brain, so starting from scratch in the learning process.
    Everything was going perfectly until I tried to add a record's primary key to a query string.  I have compared my code with the book's example code, and everything matches.  When previewing the page in my browser, and hover over the link that should pass the primary code to the next page, the query string doesn't display properly.  It shows user_id=    but no number shows, as it is supposed to.  www.webpage.com/update_user.php?user_id=
    Here is my code: (please note, <> have been removed, as I was unable to figure out how to display the code the correct way on here (copy/paste was not working, nor Insert Syntax highlighting)
    ?php do { ?       
    ?php echo $row_listUser['family_name']; ?, ?php echo $row_listUser['first_name']; ?       
    ?php echo $row_listUser['username']; ?       ?php echo $row_listUser['admin_priv']; ?     
    a href="update_user.php?user_id=?php echo $row_listUser['user_id']; ?"Edit/a     
    a href="delete_user.php?user_id=?php echo $row_listUser['user_id']; ?"Delete/a         
    ?php } while ($row_listUser = mysql_fetch_assoc($listUser)); ?
    Any ideas that could help me figure out why this part in particular isn't working would be greatly appreciated.  Writing to the database worked perfectly, I see that there are numbers in the database under user_id, and it is set as my primary key in the database setup.  Such a simple process that is causing me such a headache!
    Thanks

    Hoping this will work- complete code of page.  Hopefully you can see what isn't right!
    <?php require_once('../Connections/connSCFDIR.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_connSCFDIR, $connSCFDIR);
    $query_listUser = "SELECT user_id, username, first_name, family_name, admin_priv FROM users ORDER BY family_name ASC";
    $listUser = mysql_query($query_listUser, $connSCFDIR) or die(mysql_error());
    $row_listUser = mysql_fetch_assoc($listUser);
    $totalRows_listUser = mysql_num_rows($listUser);
    $query_listUser = "SELECT username, first_name, family_name, admin_priv FROM users ORDER BY family_name ASC";
    $listUser = mysql_query($query_listUser, $connSCFDIR) or die(mysql_error());
    $row_listUser = mysql_fetch_assoc($listUser);
    $totalRows_listUser = mysql_num_rows($listUser);
    ?>
    <?php require_once('../css/scf_admin.css'); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="/css/scf_admin.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixRtHdr #sidebar1 { width: 220px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixRtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixRtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="/SCFSpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="/SCFSpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="twoColFixRtHdr">
    <div id="container">
      <div id="header">
      <div id="mainContent"><br />
      <h1>View Users</h1>
      <table width="500" border="1">
      <tr>
        <td>Name</td>
        <td>Username</td>
        <td>Administrator</td>
        <td> </td>
        <td>  </td>
      </tr>
      <?php do { ?>
        <tr>
          <td nowrap="nowrap"><?php echo $row_listUser['family_name']; ?>, <?php echo $row_listUser['first_name']; ?></td>
          <td><?php echo $row_listUser['username']; ?></td>
          <td><?php echo $row_listUser['admin_priv']; ?></td>
          <td><a href="update_user.php?user_id="<?php echo $row_listUser['user_id']; ?>">Edit</a></td>
          <td><a href="delete_user.php?user_id="<?php echo $row_listUser['user_id']; ?>">Delete</a></td>
        </tr>
        <?php } while ($row_listUser = mysql_fetch_assoc($listUser)); ?>
      </table>

  • Trouble with channels and clients using different 802.11 g/n adapters

    Hi,
    I have moved to a new home and I have a lot of problems with the wireless network
    I have configured the airport extreme to use the "802.11n draft" with backward compatibility to b ang g at 2,4 GHz.
    I had to manually select channel because the "Auto" option will probably use channel 6 and in this way all my clients are unable to connect.
    After many tests I have found that I cannot use channels from 4 to 9 because my macbook airport card will not detect the wireless network. Channel 1 seems to be the best choice but it is used by other people in the near homes also.
    With channel 1 my macbook is able to connect and mantain a stable connection, the signal is about 35%, unfortunally other clients (using windows XP, broadcom wireless adapter or a d-link DWA-140 USB key) are unable to have a good and stable connection: it is always "low", "very low" or not available
    Using the D-Link DWA-140 wireless config utility I have discovered today that channel 5 seems to be the better for such device: using channel 5 it is able to connect windows clients from everywhere with good or excellent signal BUT my macbook wireless results completely dead instead :-/, the same for broadcom client.
    D-link is unable to connect if I set channel 6 to 9 also.
    Macbook is unable to connect to 5GHz 802.11n pre-standard, D-Link is able instead.
    I have no cordless phones or running microwaves in the kitchen, the only thing I have is an home alarm using infrared and microwave sensors in each room. But they told me that they are using a frequency range much different from 2.4 GHz. Unfortunally I am unable to completely power off them and test some more.
    May be that near homes have cordless phones, wireless routers or video/audio repetitors, I don't know. I also have much iron in my walls. It is very strange that d-link can use very well channel 5 while other wireless cards/clients are unable to find any network there.
    I am going to become creazy... if I was able to explain the situation, could anybody help to investigate some more or try to solve?
    thanks a lot in advance!
    Fabio

    may be I have found the cause of all these troubles: the alarm motion sensors installed in each room.
    I have made a search in the Internet and I have found the technical details of my sensors: microwave tecnology used by them is exactly using the frequency of 2.45 GHz :-/
    So I have moved outsite of my hause the Airport Extreme and notebooks to confirm my suppose:
    all channels were perfectly working, "auto channel" selection was ok, macbook was able to connect at 5GHz 802.11n mode. Windows client was ok too with all wireless cards or USB devices.
    The alarm sensors seem to be always active and seems not possibile to have them completely off when the alarm is not activated.
    I think I am going to switch them to a different version that does not use 2.45 GHz microwaves.
    It seems the solution to my troubles.
    Hopes this helps somebody else.

  • I am having trouble with rendereing my project using a windows computer

    Whenever I try to render my project as I make changes or add new clips and hit the render button it will close the program and say there was an error.  Any ideas??

    From the Premiere Elements Information FAQ http://forums.adobe.com/thread/1042180
    •What version of Premiere Elements? Include the minor version number (e.g., Premiere Elements 12 with the 12.0.1 update).
    •What operating system? This should include specific minor version numbers, like "Mac OSX v10.6.8"---not just "Mac"
    •Has this ever worked before?  If so, do you recall any changes you made to Premiere Elements, such as adding Plug-ins, brushes, etc.?  Did you make any changes to your system, such as updating hardware, printers or drivers; or installing/uninstalling any programs?
    •Are you using an account with Administrator Privileges?
    Run as Administrator http://forums.adobe.com/thread/969395 (Encore + "All" Premiere)
    •Have you installed any recent program or OS updates? (If not, you should. They fix a lot of problems.)
    •What kind(s) of image file(s)? When talking about camera raw files, include the model of camera.
    •If you are getting error message(s), what is the full text of the error message(s)?
    •What were you doing when the problem occurred?
    •What other software are you running?
    •Tell us about your computer hardware. How much RAM is installed?  How much free space is on your system (C:) drive?
    And some other questions...
    •What are you editing, and does your video have a red line over it BEFORE you do any work?
    •Which version of Quicktime do you have installed?
    What is your exact brand/model graphics adapter (ATI or nVidia or ???)
    What is your exact graphics adapter driver version?
    Have you gone to the vendor web site to check for a newer driver?
    For Windows, do NOT rely on Windows Update to have current driver information
    -you need to go direct to the vendor web site and check updates for yourself
    ATI Driver Autodetect http://support.amd.com/en-us/download/auto-detect-tool
    nVidia Driver Downloads http://www.nvidia.com/Download/index.aspx?lang=en-us
    IF you have version 10 and nVidia
    nVidia Driver Rollback PreElements-10 http://forums.adobe.com/thread/1317675
    -Old Drivers http://www.nvidia.com/Download/Find.aspx?lang=en-us

  • Trouble with work e-mail using Outlook 2007

    I am trying to add a work email to outlook 2007, using web access with a https://company address here/  the company provided me with, I have been googling this for some time and can't seem to find any relevant answer to this. this closest I have found
    is that it may be a configuration problem with Outlook 2007, but there is no mention of a fix.
    I would be most grateful if someone could help me with the set up

    Hello,
    Thanks for your participation in this forum.
    Please follow Sheng Jiang's suggestion and go to
    Exchange Server 2013 - Outlook, OWA, POP, and IMAP Clients forum to ask for help.
    This thread will be moved to Off-topic.
    Your understanding will be appreciated.
    Bob Bao
    Do you still use the same Windows 8 LockScreen always? Download Chameleon Win8 App quickly, that changes your LockScreen constantly.
    你是否还在看着一成不变的Windows 8锁屏而烦恼,赶紧下载这个
    百变锁屏
    应用,让你的锁屏不断地变化起来。

  • Trouble with screen resolution when using Parallels and ACT on Macbook Pro (late 2013)

    Hello, I have installed my Sage ACT 2013 software on my Macbook Pro 13" Retina (late 2013) computer that has 16GB of RAM and an i7 core processor using Parallels 9 desktop and Windows 7- 64bit.  The problem is that the screen resolution is very small and condensed to the left side making reading the title boxes and content very difficult.  I reached out to Parallels who was unable to resolve the screen resolution by either  adjusting the display settings or the Windows 7 video settings. Right now they have the Resolution listed as "Scaled" as the "Best for Retina" & "More Space" options did not help the issue.  What is even more strange is that I have Office 2013 installed on the Parallels side so that it can interface with ACT and those screen resolutions read just fine.  Are there any ACT/MAC users out there that might have any insight for me? Thx!

    See -> http://manuals.info.apple.com/MANUALS/1000/MA1636/en_US/boot_camp_install-setup_ 10.8.pdf.
    In addition to the Windows disc (or USB flash drive with the Windows installer) you'll need a 8GB+ flash drive.
    The referenced manual - on page 3, I think, gives you a run-down of what you'll need before you begin the installation. You may also want to post any further Boot Camp questions in the Boot Camp forum -> https://discussions.apple.com/community/windows_software/boot_camp.
    Good luck,
    Clinton

  • Trouble with sampling color while using paint tool... help!

    The other day, Photoshops started acting a little funny. Specifically, when using the paint tool, I'll hit option (alt) to sample a color to the foreground but it is sampling to the background instead. I have tried to reset all tools and no dice. Does anybody know how i can reverse this? it is screwing up my whole blending procress.

    With the paint brush selected, go to the Color panel, and click on the foreground colour so it has a feint white line around it.

  • Trouble with foul language when using dictation?

    I've been using the dictation tool, which is remarkably useful. But it has a significant downside, which is that when I mistakenly hit the shortcut key (fn twice), and don't dictate, it begins inserting random words into my text. These range from "hey there" and other innocuous terms, all the way to four-letter words.
    Both types of random insertions are bad, in part because I then have to go back through any transcribed text to extract the random insertions. But the four-letter words are obviously a major concern for my professional work.
    I have tested to make certain that the random insertions aren't just misinterpretations of something I said. I left open a document I had been working on, placed the cursor in the middle of the text, and then hit the shortcut key. Pretty soon, in popped a word that would make my grandmother blush.
    What's up with that?!?

    Thanks for the reply.
    Yes, I have cleared all cookies and reset Safari, several times.
    I just discovered that having that box checked does NOT prevent me from
    logging into e-mail, when using Firefox web browser, version 3.6.19
    I was wrong to have made the statement about different browsers, in my previous posting.

  • Problem with focus with an ALV grid using object methods

    Hi, i have an editable ALV and there is something wrong that we haven't been able to solve it yet, hope you can understand my explanation
    Supose a grid 2 x 5
    cell 1 - cell 2 - Cell 3 - Cell 4 - Cell 5
    001      John      Doe
    So when a press tab or enter to the any cell diferent from cell 1 the focus get back to the cell 1, and i have to tab ( in this example) 3 times to fill cell 4, and then 4 times to fill cell 5
    Any ideas???
    ttorres

    Hi,
    Use method :SET_CURRENT_CELL_VIA_ID of grid to set the cursor position in a cell.
    Ex:
    CALL METHOD O_GRID->SET_CURRENT_CELL_VIA_ID
          EXPORTING
            IS_ROW_ID    = V_ROW
            IS_COLUMN_ID = V_COLUMN
            IS_ROW_NO    = V_ROW_NUM.
    use methods : get_current_cell_row_id, get_current_cell
    to get the required parameters for SET_CURRENT_CELL_VIA_ID.
    Regards
    Appana

Maybe you are looking for