Sorry quick simple question

when implementing a simple branch , can i check the equality of strings to generate a boolean?
e.g.
string s1 = "large";
string s2 = "large";
if (s1 != s2)
{ do some code}
else
would the code in the "if" branch be executed???

If part will never be executed.
also "string" should be "String"
public class stringtest{
     public static void main(String args[]){
     String s1 = "large";
        String s2 = "large";
        if(s1.equals(s2)){
          System.out.println("They are equal");
        else{
          System.out.println("They are not equal");
}

Similar Messages

  • Hopefully a quick, simple question

    Just got a shuffle and want to get different headphones. My question is this, what size is the headphone jack for the shuffle? Is it 3.5mm? Thanks!!!

    yes, standard 3.5mm mini.

  • Quick Simple Question

    I have an Image that I have successfully caputred from a paintComponent method, and I have rotated it the way I want to. I need to move it up a couple units. So how do I use the Transform3D to move a shape in my 3D world.
    Basically, I have two such planes and I need to draw them with the same x, z axises but different y axisis so that one is "floating" above the other, but they are parallel. I can now draw them both, but I want to move one up a little bit and the other down a little bit.

    Let's suppose your object is child of the TransformGroup objTransform.
    =====================================================
    If you want to put the object at position (1.0,1.0,0.0)
    Transform3D t3d = new Transform3D();
    t3d.setTranslation(new Vector3d(1.0,1.0,0.0));
    objTransform.setTransform(t3d);
    // thats it!
    =====================================================
    If you want to put the object at (1.0,1.0,0.0) with
    "rotation" ( 0 , 30 , 0 ) to the axis (x,y,z), you'll
    have to do some more :
    Transform3D t3d2=new Transform3D();
    t3d2.setEuler(new Vector3d( 0 ,30,0 ) ); // "rotate" it
    Matrix4d matrix = new Matrix4d(); // create a 4 dim matrix
    t3d2.get(matrix); // put the t3d2 into the matrix
    matrix.m03 = 1.0; matrix.m13 = 1.0; matrix.m23 = 0.0; // set "point"
    t3d2.set(matrix); // put the matrix into the t3d2
    objTransform.setTransform(t3d2); // move the object's transformgroup
    ======================================================
    Matrix4d transforms:
    A B C D
    E F G H
    I J K L
    M N O P
    Translation is encoded in D, H, L
    Scaling and rotation are encoded in A, B, C, E, F, G, I, J, K
    matrix.m00 = A , matrix.m01= B etc..

  • Probably incredibly simple question, so sorry. I have just changed e-mail after many many years and I want to e-mail everyone in my mac mail client with the new e-mail address at the same time.

    Probably incredibly simple question, so sorry. I have just changed e-mail after many many years and I want to e-mail everyone in my mac mail client with the new e-mail address at the same time.

    If you are using Address Book, open it, create a new Group, select all you contacts by click the top one while holding down the shift key and then select the last one. Drag the contacts to the group, then send an e-mail to the group.

  • How do I select a square brush for the brush tool in CS6?  Sorry if this is a simple question, but nothing has ever been simple for me in Photoshop.

    How do I select a square brush for the brush tool in CS6?  Sorry if this is a simple question, but nothing has ever been simple for me in Photoshop.

    I don't believe there is a square brush among the sets that ship with Photoshop, but there are plenty to download, and it is super easy to make one.
    Just drag with the rectangular Marquee tool, fill with black on a new layer, and go Edit > Define brush preset
    Browsing Photoshop Brushes on DeviantArt

  • Simple Question - attribute alternative text within the same Word doc

    ok. I am having a brain freeze and can't locate the answer in the OPA help. Simple question.
    Is there a simple way to alias an attribute for use in Word?
    For instance the following two conclusions create 2 attributes where I only want 1 attribute.
    the annual percentage rate = 6
    APR = the annual percentage rate
    Is there a configuration option or something to alias APR as the annual percentage rate for use in Word? I want to use either in the same Word document. Something in my head tells me I saw that once before, but all of a sudden I have a brain freeze.
    Sorry for such a simple question, but sometimes I get too deep in the weeds.

    Hi Paul,
    You may be thinking of the OPA legend style. In the Office 2007 OPM ribbon it's called Table Legend, but I believe it works with non-table rules in Word as well - it certainly used to.
    It's an OPA rule style which can be used when you want to refer to a shorthand version of an attribute, e.g. "APR" instead of "the annual percentage rate". I believe it only applies to the rule immediately below where it has been set in the doc, and not the entire doc.
    I did a quick search in the OPM Help and found references to the legend style, but I didn't find a description of the functionality (I didn't search too thoroughly though).
    Here basically how it works...
    Above the rule write the shorthand version, then the word "is", then the full attribute text, e.g.
    APR is the annual percentage rateSide note: I always bold the "is" in the legend line. This is not required, but I like to do it because it makes it clearer at a glance which part is the shorthand and which part is the full attribute text.
    Then apply the Table Legend style to the line, then put your Word table or regular rule below it, e.g.
    [legend]APR is the annual percentage rate
    the result = APR * 10 I use this functionality occasionally. Usually it's when I've got calculations in Word tables and I'm trying to make the left hand column more readable, e.g. using something "APR" in the formula so that it doesn't take up so much space.
    Cheers,
    Jasmine

  • May be slightly simple question from a new Mac user: Why can't I quit safari? I cannot quit it from top menu bar neither to do it from dock? All other apps are working normally.

    May be slightly simple question from a new Mac user: Why can't I quit safari? I cannot quit it from top menu bar neither to do it from dock? All other apps are working normally.

    Or you can actived the right button on your magic mouse and click on they icon in the dock. then you select "stop" and it's out of your dock.
    Greetings
    *update: Sorry, my mistake! I didn't read your message correct! Sorry for the inconvience!

  • HT4759 Simple question : I'd like to use Icloud on my Mac (Mac os 10.6.8). apparently I need an os version of 10.7 or higher. Tried Lion 10.8 but cannot install on my Mac. What can I do ?

    Probably a simple question : I'd like to use Icloud on my Mac (10.6.8). Apparently I need an OS version of 10.7 or higher. I tried Lion 10.8 but cannot install this on my Mac. What should/can I do ?
    Thanks a lot !

      Model Name:          iMac
      Model Identifier:          iMac11,2
      Processor Name:          Intel Core i3
      Processor Speed:          3.2 GHz
      Number Of Processors:          1
      Total Number Of Cores:          2
      L2 Cache (per core):          256 KB
      L3 Cache:          4 MB
      Memory:          4 GB
      Processor Interconnect Speed:          5.86 GT/s
      Boot ROM Version:          IM112.0057.B00
      SMC Version (system):          1.64f5
      Serial Number (system):          W80380E6HAD
      Hardware UUID:          F2F7F222-0FE4-56BB-8E55-6C7A3E290E13
    Sorry, not so clever about these things but this is what I have. Would this be OK?

  • Simple Question-Deleting Finder Prefs

    I have not been able to shut my macbook down properly. I keep getting the message that "Logout has timed out because Application 'Finder' failed to quit." Someone on the discussion boards suggested deleting the finder prefs and listed:
    "Your Account/library/preferences/com.apple.finder.plist"
    "Your Account/library/preferences/com.sidebarlists.plist"
    Following these changes, it was suggested to relaunch the Finder through Force Quit window ...
    an to then try logging out ...
    My question is how to delete the Finder preferences listed above. I have tried and can not figure it out. Sorry for the simple question. Appreciate the help. Thanks.

    Open a Finder window. Under PLACES in the sidebar, there should be a "home" icon with your user name. Click in that. That's "Your Account" from your post.
    Now find the folder called "Library." Double-click on it.
    Now find "Preferences." Double-click on it.
    Now find the file called "com.apple.finder.plist" and drag it to the Trash. Do the same with the other file. Empty the Trash.
    Then go to the Apple menu and select Force Quit... Select Finder and click on Relaunch button.

  • Pretty simple question regarding headphones.

    Hey everybody. I want one of the new shuffles as a secondary iPod, however, I just got a new pair of Bose in-ears and there's no way I'm letting them go to waste. I guess I have a few simple questions anyone who already has a new shuffle can easily answer:
    1. Does playback immediately start upon switching the switch to either shuffle or straight through? and
    2. Can you plug in the apple headphones, adjust the volume to an acceptable level, select a playlist, etc., then switch out to third party headphones to listen?
    As for an adapter, there's no way I'm spending money on accessories for an $80 mp3 player. Sorry Apple...

    WavesOfFury wrote:
    1. Does playback immediately start upon switching the switch to either shuffle or straight through?
    No
    2. Can you plug in the apple headphones, adjust the volume to an acceptable level, select a playlist, etc., then switch out to third party headphones to listen?
    Yes
    Basically, when you unplug the apple headphones, or even turn it off after you've set what you want it'll keep your 'settings' but stop playing.
    When you plug in your own headphones, you just need to switch it off and on again to continue playing where you left off.
    Awkward, but possible. Btw, the new shuffle audio quality and playlist handling is definitely an improvement over the 2nd gen shuffle. Basically the player is better all round.
    It's just the lack of a headphone adapter that lets it down.

  • Disk space-simple question

    This is a simple question, I think: I have an external drive (250GB) and have my iPhoto and iTune libraries over there. If I delete about half of my photos from the main library (on the desktop, G4, running 10.4.10) to free up some space, will I still have all my photos from the original main library on the external drive, and just as important, will I still be able to update the external drive as I add new photos to the main library.
    Sorry, I know this is basic stuff but I want to be sure I can free up some space but not lose any photos in the process.
    Thanks, Mike

    Hi--
    If you delete files on the computer they will still remain on the external hard drive. HOWEVER, if you are using a backup program that updates the external drive to reflect the G4 then it may erase whatever you've deleted on the G4. It depends on how the backup program is set (if you are using one).
    If you are not using a backup program and just dragging the folders over to the external drive manually then you would have to be careful not to replace the folders that you want to keep on the external drive. Say for example you have your "Pictures" folder on the external drive. If you delete a bunch of photos on your G4 and then move the "Pictures" folder from your G4 to the external drive, it will REPLACE the "Pictures" folder on the external drive.
    One way to get around this would be to make a seperate folder on your external drive EACH time you made a backup, and drop your "Pictures" folder into that.
    Does this make sense?

  • Pro Tools convert to Logic Newbie some simple question for logic users

    Hey guys, I am a recent convert from Pro Tools! and There were just some simple questions I thought some of you may be able to help me out with. I am using Logic 9.1.1
    1) After I set up a multi timbral software instrument (in this case MOTU Symphonic Library) how do I set up midi channels to trigger the individual sounds in the instrument. (in pro tools I used to create a midi track then send an output of that track to that particular soft synth)
    2) How do I set up a and forgive my Pro Tools vocab but basically I want to set up a reverb channel on an aux track have it receive on a bus so I can send other tracks to that particular bus.
    Thanks for the insight and really looking forward to finally make use of all this ram! lol

    1) I have a nord stage and would like record via midi. In pro tools i would usually need to create a midi track with the output set the the nord and an audo aux track to hear it What would I do in order to record midi from my nord stage?
    To record, just select a non-audio track, hit record and play the keyboard. The notes will get recorded into a region.
    If you want to play it back to the Nord Stage as well, then it makes sense to set the Nord up as a MIDI device in your templates, so you can just add the Nord to a track and not worry about what MIDI ports it's on etc. Open the environment, create a New -> Instrument, called it "Nord Stage", set the MIDI port and MIDI channels it's on, and sav your template.
    Now, when you start a song, to sequence the Nord, you just assign the Nord instrument to a track (by for instance, right clicking on a track and choosing your Nord instrument from the list of environment obects that appears).
    2) The multi instrument trick is quick and easy its great but How would I do that manually?
    Lots of ways, look into your key commands, ther are all kinds of "Create track with same instrument", "Create track with next MIDI channel" and so on. There are too many ways to do this to quickly talk about here. In short, all tracks have an environment object assigned to them, whether it's an audio object, or a MIDI instrument object, and this determines where the data on the track goes.
    3) How do you set up midi so that it doen'ts overwrite notes when recording over them?
    Not sure I understand you here...

  • FIRE FOX SUCKS. ALL THIS BULLSHIT TO ASK A SIMPLE QUESTION. GOGGLE IS HASSLE FREE IN THIS DEPT. FIRE FOX CAN NOT APPRECIATE SOMEONES TIME.

    Question
    FIRE FOX SUCKS. ALL THIS BULLSHIT TO ASK A SIMPLE QUESTION. GOGGLE IS HASSLE FREE IN THIS DEPT. FIRE FOX CAN NOT APPRECIATE SOMEONES TIME.
    OH, THE PART ABOUT SIGNING UP FOR AN ACCOUNT...THEN IT SAYS' "THANK YOU FOR BERING AWESOME". THAT'S ABOUT AS MUNDANE AS A "CARBON FOOTPRINT".

        Hi Nikgee
    I'm not showing any issues with that browser. I tested  firefox on our site. I'm sorry have you tried clearing your browser history and retesting. Are you having difficulties with other sites?
    Thank you
    JoeL_VZW
    Please follow us on twitter @vzwsupport

  • SIMPLE QUESTION: LYNC 2010 -- AVAYA CS1000 DIRECT SIP: IS THAT POSSIBLE? PLEASE HELP!

    Hello,
    I would like to ask really simple question here: is that possible to establish (configure, setup, create, make etc.) a direct SIP connection between LYNC 2010 and AVAYA CS1000 PBX. On one side I have Lync 2010 Standard Edition acting as Front-End Server
    with co-located Mediation Server. On another side I have AVAYA CS1000 IP PBX Version 7.0. We are trying to make this happen for 1 full year with no luck. The issue is that we do not manage our PBX (external company does).
    Here is what we are basically trying to achieve:
    All I want is that basically LYNC user (phone # 5678) can dial PBX user (phone # 1234) and talk. Also PBX user can call LYNC user and they can talk. I'm pretty sure that all I'm asking is very simple thing. I don't expect magic to happen (e.g. when one user
    calls another user the world will change). All I want is to be able to call between LYNC and PBX users so they can talk.
    Sorry for repeating again but here is my simple question: can direct SIP (or call it SIP trunk if this is the right word) be established so LYNC and PBX users can call each other and talk. Whatever protocol is (G.711, G.722 etc.) I will be happy.
    If you can let me know I would very much appreciate this. I'm sure I'm not alone in this world and many companies out there using AVAYA CS1000 and deployed LYNC and probably have the same question so it may be helpful to other people as well.
    Thanks!

    Hi Thamara for reply. I can see where you are going, but the challenge here is that I have found many threads including in this forums from people who successfully connected CS1000 PBX to Lync 2010 for two-way calling, and even dual-forking (which I cannot
    even dream about at this time).
    If you go to AVAYA WEB site, you can find official AVAYA compatibility MATRIX that is available here:
    http://www.google.ca/url?sa=t&rct=j&q=avaya%20compatibility%20matrix%20lync&source=web&cd=1&ved=0CBwQFjAA&url=http%3A%2F%2Fsupport.avaya.com%2Fcss%2FP8%2Fdocuments%2F100135385&ei=v3-5TsXVKMLX0QGHpdSkCA&usg=AFQjCNG6cmW5izdOASMuW34b8iK0vWnwuw
    According to this document, only CS1000 version 7.5 supports Lync 2010 and only via ACE - starting first quarter of 2011 (which is done deal by now) - see below for details. The problem is that I have a hard time to understand the meaning of the word "Supported".
    I do not really need full support, all I want is to be able to call in both directions using 2 distinct numbers (e.g. 4 digits extensions) that are configured in both systems.
    Another thing is this ACE. Apparently it is a big monster software that you need to buy and pay big bucks and lots of configuration just to make it working. But I'm not even sure what will work. We do have one-way calling (from Lync to PBX) - it just does
    not work other way, and I have no idea why. I'm not sure if this cannot be working, or because it was not setup right. As I mentioned before we have no access and clue about IP PBX - this is one of my issue here. Withoul knowledge how it works on PBX side
    I cannot be sure what is causing this.
    So I was wondering if anybody in this world was able to connect CS1000 PBX to Lync and perform two-way calling using two systems.
    Thanks!
    Microsoft OCS 2010 Lync
    Supported (via ACE) - 1Q11

  • Quick script question

    Hi all,
    Could anyone advise me if i can add anything within - header('Location: http://www.mysite.co.uk/thankyou.html'); in the script below so as the page
    re- directs back to the main index page after a few seconds ?
    Thankyou for any help.
    <?php
    $to = '[email protected]';
    $subject = 'Feedback form results';
    // prepare the message body
    $message = '' . $_POST['Name'] . "\n";
    $message .= '' . $_POST['E-mail'] . "\n";
    $message .= '' . $_POST['Phone'] . "\n";
    $message .= '' . $_POST['Message'];
    // send the email
    mail($to, $subject, $message, null, '');
    header('Location: http://www.mysite.co.uk/thankyou.html');
    ?>

    andy7719 wrote:
    Mr powers gave me that script so im rather confused at this point in time
    I don't think I "gave" you that script. I might have corrected a problem with it, but I certainly didn't write the original script.
    What you're using is far from perfect, but to suggest it would lay you open to MySQL injection attacks is ludicrous. For you to be prone to MySQL injection, you would need to be entering the data into a MySQL database, not sending it by email.
    There is a malicious attack known as email header injection, which is a serious problem with many PHP email processing scripts. However, to be prone to email header injection, you would need to use the fourth argument of mail() to insert form data into the email headers. Since your fourth argument is null, that danger doesn't exist.
    One thing that might be worth doing is checking that the email address doesn't contain a lot of illegal characters, because that's a common feature of header injection attacks. This is how I would tidy up your script:
    <?php
    $suspect = '/Content-Type:|Bcc:|Cc:/i';
    // send the message only if the E-mail field looks clean
    if (preg_match($suspect, $_POST['E-mail'])) {
      header('Location: http://www.example.com/sorry.html');
      exit;
    } else {
      $to = '[email protected]';
      $subject = 'Feedback form results';
      // prepare the message body
      $message = 'Name: ' . $_POST['Name'] . "\n";
      $message .= 'E-mail: ' . $_POST['E-mail'] . "\n";
      $message .= 'Phone: ' . $_POST['Phone'] . "\n";
      $message .= 'Message: ' . $_POST['Message'];
      // send the email
      mail($to, $subject, $message);
      header('Location: http://www.example.com/thankyou.html');
      exit;
    ?>
    Create a new page called sorry.html, with a message along the lines of "Sorry, there was an error sending your message". Don't put anything about illegal attacks. Just be neutral.
    By the way, when posting questions here, don't use meaningless subject lines, such as "Quick script question". If you're posting here, it's almost certain to be a question about a script. It doesn't matter whether it's quick. Use the subject line to tell people what it's about.

Maybe you are looking for

  • Can anyone tell me what is wrong with the simple sql?

    Hi, I have a simple SQL (see attached). It returns records when it does not include the Order By sorting clause. However, if it includes the Order By clause, Oracle says no data found. Anyone can give me some ideas what could cause the problem? Thank

  • How to use bapi "BAPI_NETWORK_COMP_CHANGE".

    Hi to all, I need ur help, I would like to set the indicator of Matrial Component in PS gentated reservation. I think "BAPI_NETWORK_COMP_CHANGE" is useful for me. Pls sugest which are the I/Ps paramater for this bapi. Thanks in advance. Regards, Jaim

  • Can I rotate an .avi in iPhoto?

    I'm transferring over my photos from my PC and I have several video clips that I'm importing with the photos. Most of the time, they don't show up as video, just jpg. A few of them imported sideways and do play. The rotate button at the bottom is gre

  • Merged clips audio not playing

    Is there a reason why my merged clips no longer play audio? Also is there a way to batch merge clips? I had to individually sync my whole project one video/audio clip at a time...a little disappointing to do all that work and come back to my project

  • Professional Level Certification - P_ADM_SYS_70

    To All BASIS Community, May I have some guidance for the preparation of Professional Level Certification - P_ADM_SYS_70. My total experience is 6 Years. Looking forward for hearing a favorable response. Best Regards, Unni.