How to know the size of the string with out using the length() method

i want to find the lenght of the
String s="Sudha";
with out using the lenght() method.

Not true (I mean the part about "The only String
call"). But if it had been true, I might haveagreed
with this:
Assuming one uses the 'exception' approach thenwhat
method other than charAt() is needed?I probably misunderstood your post, I thought you
meant that the only alternative to length() would be
charAt() and catching the exception.There are many ways and if the teacher had said find 5 ways of finding the length of a String then I would have fealt happier because it would have meant the student would have to read and study the whole of the String API.
I like
int length = (s+"sabre").lastIndexOf("sabre");

Similar Messages

  • How to display the alv report blocks wise with out using the blocked alv

    Hi
    How to display the alv report with out using the blocked alv function module.
    Thanks
    Chinnu

    see this Standard Program
    RPR_ABAP_SOURCE_SCAN

  • How to Embed HTML into a Infopath form with out using the custom code???

    Hi ,
    This my first post in MSDN, so kindly ignore if there is any faults/mistakes.
    scenario:
    I am updating a HyperLink(url) to an infopath Field (Such as Rich text box /Label) from a third party workflow(Nintex),it is not able to embed the html data .is it possible to embed html controls like <a> and <Br> tags in the infopath form?????

    The InfoPath form can be configured to export some of the fields as columns... by doing so, the workflow can simply update the list item's metadata, and the value is pushed into the InfoPath form data.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • How do you change apps on your phone with out using the home button?

    Just trying to see if there is an easier way.

    You can enable Assistive Touch which puts a small square with a circle on your screen and can use that to switch apps/exit to the Home Screen, I believe.
    ~Lyssa

  • How to print a string with out using main method??

    how to print a string with out using main method??
    if we can tell me with example?
    thanks in adavance
    raja

    Hi,
    actually there's none. The UITableView class needs to "know" the tableView's height so either it can calc <number of rows> times <row height> or it has to sum the height of each single row.
    If the row which needs to be of different size always is the first or the last row you can user a tableHeader or tableFoot view.
    Regards
    Dirk

  • HT1539 can i add my digital copy to itunes with out using the disk? my netbook does not have a disk drive and i want to add my movie to my ipod can i do it with out the use of the disk and just the code?

    Can I add my digital copy movie to my iTunes with out using the disk, my gateway laptop/netbook does not have a disk drive I have the unused code and everything, I just can't stuck the movie into the computer itself and my desktop computer has no internet on it. Is there a way to add my movie to my iPod touch 2nd generation tuning 4.2.1

    Hiya!
    It depends on what kind of digital copy you have.  This article goes ino details regarding the two types, and depending on the type you have, you may or may not need the DVD to redeem the code.
    Transferring video from DVDs with iTunes digital content
    http://support.apple.com/kb/HT1539
    I hope this helps!  Best wishes and good luck!

  • Is their a way to activate the "find my iphone" app with out having the iphone with you

    is their a way to activate the "find my iphone" app with out having the iphone with you

    how do i activate the lost mode on my "find my iphone" app without reporting it lost?  What do i have to do to activate this app prior to any loss?  [email protected] Thanks, JN

  • [svn:osmf:] 10655: Removing the hack we came up with for using the MAST plugin in the Flex unit tests .

    Revision: 10655
    Author:   [email protected]
    Date:     2009-09-28 13:52:01 -0700 (Mon, 28 Sep 2009)
    Log Message:
    Removing the hack we came up with for using the MAST plugin in the Flex unit tests.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/.actionScriptProperties
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/MediaFrameworkTests.as
    Removed Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/mast/
        osmf/trunk/plugins/MASTLib/

    Hi OMAW8,
    It would be better if you could share us the detailed error message in English.
    Do you mean that you could run your test in your build agent machine? If so, I doubt that it would be related to the TFS build. I mean that maybe it is not the test issue.
    Please share the detailed error in English, and then post this issue to the TFS-build forum would be better for this issue since it works well in build agent machine.
    Form link:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=tfsbuild
    Reference:
    https://msdn.microsoft.com/en-us/library/hh691189.aspx
    Best Regards,
    Jack
    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.

  • How To Split File In to Multiple Files With out using B.P.M

    Hi Guys,
    How To Split File In to Multiple Files With out using B.P.M.
    Thanks in advance
    Regards's
    KIran.B

    Hello
    below r the links were u will find message spilitting by graphicaaly i.e without using BPM.
    /people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool
    Sender File Adapter with file conversion  Multimapping --file content conversion with split messg mapping
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2748---- [original link is broken] [original link is broken] [original link is broken]
    multimappig
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    hope this resolve your problem
    thank's
    Chetan

  • How to achieve Check point functionality in SSIS with out using check point.

    I got question from
    interview!!! How
    to achieve Check
    point functionality in SSIS with out using check point. If package
    fails it has to be re-run from the point that it failed instead
    of rerunning the entire package.without
    using check point.
    Please
    any one can explain step by step...

    Sorry you have failed your interview question. Good thing you remembered it, thought about it, and ask a question about it. The solution is actually very straightforward.
    Create a table to store the state of your progress. Before each step read the table to find out where left off, then skip each completed step. After each step write to the table which step you have completed. A step can be anything, a task, a component,
    a row, an import file, an export file. You don't have to use a table, it could also be a file, just something you can read and write, and does not disappear when your package stops.
    If you find this difficult to comprehend, think of a checklist of things you do everyday and work from there.

  • How could I undisable my I phone 4s with out using iTunes

    How could I undisable my I phone 4s with out using iTunes

    Kittyyy wrote:
    How could I undisable my I phone 4s with out using iTunes
    You don't.  ITunes is needed.
    Forgot passcode for your iPhone, iPad, or iPod touch, or your device is disabled - Apple Support

  • How to get the inserted row primary key with out  using select statement

    how to return the primary key of inserted row ,with out using select statement
    Edited by: 849614 on Apr 4, 2011 6:13 AM

    yes thanks to all ,who helped me .its working fine
    getGeneratedKeys
    String hh = "INSERT INTO DIPOFFERTE (DIPOFFERTEID,AUDITUSERIDMODIFIED)VALUES(DIPOFFERTE_SEQ.nextval,?)";
              String generatedColumns[] = {"DIPOFFERTEID"};
              PreparedStatement preparedStatement = null;
              try {
                   //String gen[] = {"DIPOFFERTEID"};
                   PreparedStatement pstmt = conn.prepareStatement(hh, generatedColumns);
                   pstmt.setLong(1, 1);
                   pstmt.executeUpdate();
                   ResultSet rs = pstmt.getGeneratedKeys();
                   rs.next();
    //               The generated order id
                   long orderId = rs.getLong(1);

  • Spooling the output of a Query with out displaying the rows

    Hello All,
    Is it possible to spool the output of
    a query/dbms_output.put_line with out displaying
    the Query output on the console.
    In my case,list of rows in the output is huge, I want
    to eliminate displaying the output of query
    so that spooling will complete faster.
    Thanks in advance.
    -Srini

    You can do:
    SET TERMOUT OFFIn your script before doing the spool command.
    You will have to write your query as a .SQL script and run it from SQL*Plus in order for it to work the way you expect.
    sqlplus -s username/password @query_script.SQL

  • How do I get a PPT slide to build at precise times with out using the mouse?

    Here is what I am attempting to do. I have imported a PPT presentation into Captivate v4. I have already recorded the audio that I need for each slide. A couple of the slides need to build during the narration at specific points to coincide with the audio. I want to be able to do this without the end user having to click in order to advance as eventually I will publish this as avi file.
    Does any one know how to do this?
    Thnaks in advance.
    Hari

    I think I have figured it out. I had imported the PPT file without audio and had recorded the narration in CP4. I wanted to control the animations (slide builds) in CP, but couldn't find a way of doing it. You put me on the right track though, i.e. I configured the timing in of the animations (builds) in PPTand then reloaded that particular slide which synced with the narration I had recorded.
    hanks for your suggestions.
    Hari

  • How do i run this peice of code with out executing the PROC

    I have the following code which i want to run but not a a Pocedure.
    I know its always better to runa PROC but this is for test purpose so the only target is to run it by part or somehow but with out the need to create or execute a procedure
    CREATE PROCEDURE temp_account_salary_archive_proc
    IS
    CURSOR arcur
    IS
    SELECT sequence_num
    FROM north.account_offer
    WHERE north.datediff ('mm', hire_date, SYSDATE) > 3;
    BEGIN
    FOR arrec IN arcur
    LOOP
    INSERT INTO north.account_salary_archive
    SELECT *
    FROM north.account_salaries
    WHERE sequence_num = arrec.sequence_num;
    DELETE FROM north.account_salaries
    WHERE sequence_num = arrec.sequence_num;
    END LOOP;
    COMMIT;
    END temp_account_salary_archive_proc;
    I need to know which parts of this code is to be executed if i want to run the process with out the help of Stored Procedure
    I am on Oracle 10g
    and I am a beginer.

    781244 wrote:
    Sorry for not mentioning earlier sir. It is Oracle 10g.
    And the DATEDIFF function I am using is a user defined function which i created.Ok, i apologize ... thanks for the clarification.
    The code as you've posted is not something i'd want to run on any volume of data. It will be horribly slow (looping is the slowest method to perform a SQL operation in Oracle).
    Much faster would be to simply
    INSERT --+ APPEND
    INTO north.account_salary_archive
    SELECT *
    FROM north.account_salaries
    WHERE sequence_num in
       SELECT
          sequence_num
       FROM north.account_offer
       WHERE north.datediff ('mm', hire_date, SYSDATE) > 3
    DELETE FROM north.account_salaries
    WHERE sequence_num IN
       SELECT
          sequence_num
       FROM north.account_offer
       WHERE north.datediff ('mm', hire_date, SYSDATE) > 3
    );2 fast SQL statements (fast being a relative term, this will depend on the number of rows you need to play around with here).
    Even faster would be partition exchanges (if you have partitioning on this table).
    If you notice, i put an APPEND hint in the INSERT statement. Please read about it in the documentation and determine if you meet the restrictions to use it or not. If you do that will increase the performance of your INSERT.
    I would also try to remove the custom function you created (DateDiff) and replace that with the logic required (is the function horribly complex?). Calling functions/procedures (custom created) places a good deal of overhead on SQL operations.

Maybe you are looking for

  • What is the check box column for in iTunes?

    I just upgraded to the latest version of iTunes (11 something).  Now the checked songs on the Music/Song page do not sync with my iphone.  I have to go to a separate page to select what I want to sync with my phone and if it's not my whole library I

  • DYNAMIC CREATION OF LINE SERIES USING ACTIONSCRIPT

    There's something wierd about flex or im doing something wrong? - when i create a line series manually using mxml and specify a id for the series, it works. - similarly when i try to dynamically create a line series using actionscript & define an "id

  • G4 and microphone suitable for sound input port

    I'm looking into getting started with podcasting and I need help with selecting a microphone. I'm on a G4 desktop machine with a sound input port, any suggestions as to the tech spec or manufacturer of a suitable microphone would be most appreciated.

  • Avi files missing from view in Organizer

    I recently installed Premiere Elements 8 and Photoshop Elements 8.  I captured 1 hour of video from my DV camcorder  The capture resulted in 43 avi files being transferred to my Vista PC.  The files all show up fine in the Premiere Elements editor pr

  • Display Blob content in Apex

    Hi folks I hope you can see HTML Expression code now. I have PDFs stored in BLOB columns along with FILE_ID column in the database. I want to display these to the APEX user on the page at runtime. I have created a SQL Query report page to display FIL