Probem in printing the randum output from HashSet

hi all,
pls give me some hints to print only one randum out put..
my code
public static void main(String args[]) {
          HashSet set =new HashSet();
          set.add("Scambled egg");
          set.add("waffles");
          set.add("fruit");
          set.add("cereal");
          set.add("toast");
          set.add("yogart");
          Iterator itr = set.iterator ( );
          while(itr.hasNext()){
          String breakfast = itr.next().toString();

i have done it..
can you pls edit my code..
ArrayList list = new ArrayList();
          list.add("Scambled egg");
          list.add("waffles");
          list.add("fruit");
          list.add("cereal");
          list.add("toast");
          list.add("yogart");

Similar Messages

  • Printing the Package output from Anonymous block

    Hi,
    I need to call the below package from anonymous block and get the output.
    Could you let me know.
    I tried using this, but i don't get data.
    ===========Anonymous Block=====================================================================
    declare
    var              xxdc.xxdc_sr_log_his_pkg.sr_tbl_type;
    l_sr_idx_bi  BINARY_INTEGER := 0;
    BEGIN
    xxdc.xxdc_sr_log_his_pkg.service_record('14040',var);
    dbms_output.put_line('CLAIM_CREDIT_OFFERS  :'||var(l_sr_idx_bi).qa_credit_offers(l_sr_idx_bi).character1 );
    end;
    =============================================================================================
    ============================================================================================
    Package Spec
    TYPE cr_offer_type IS TABLE OF apps.qa_results_v%ROWTYPE  
    INDEX BY BINARY_INTEGER;
    TYPE sr_rec_type IS RECORD
    (task_status                      apps.jtf_task_statuses_tl.name%TYPE
    ,task_type                        apps.jtf_task_types_tl.name%TYPE
    ,qa_credit_offers                 cr_offer_type
    TYPE sr_tbl_type IS TABLE OF sr_rec_type
    INDEX BY BINARY_INTEGER;
    PROCEDURE  service_record(p_service_req_num IN  VARCHAR2
                                               ,p_service_req_tbl OUT sr_tbl_type
    Package Body
           FOR emp_row_rec IN cur_credit_off
           LOOP
             l_sr_tbl(l_sr_idx_bi).qa_credit_offers(l_sr_idx_bi).character1 := emp_row_rec.character1;
             --dbms_output.put_line( l_sr_tbl(l_sr_idx_bi).qa_credit_offers(l_sr_idx_bi).character1);   --commenting for testing
              l_sr_idx_bi := l_sr_idx_bi + 1;
           END LOOP;
          p_service_req_tbl := l_sr_tbl;
    =============================================================================================
    Thank

    Hi,
    Did you issue the SQL*Plus command
    SET  SERVEROUTPUT  ON
    or, if you're using some other front end, its equivalent?
    Can you ever see output from dbms_output?  For example, what happens when you run this?
    SET  SERVEROUTPUT  ON
    BEGIN
        dbms_output.put_line ('Hello, world!');
    END;
    Since I don't have your tables, I can't actually run your code.  If you'd post CREATE TABLE and INSERT statements, or re-write the package to reference commonly available tables, such as those in the scott schema, then I could test it.

  • Need to Print the Report Output

    Hi,
    I want to print the report output. How to install a printer in Oracle Appls. If i give number of copies 1 or morethan 1(from SRS Window)...the report is completed-warning. pls advice
    Thanks in advance.

    Hi,
    I changed the printer to Epson LQ2170 and Epson LQ2180 but since I don't know the initialization and reset parameter (already search for the manual but couldn't find it, downloaded from Epson's website but couldn't find it either) so I register it with LQ1070. I'd tested to print the reports directly from Reports Builder 6i and it printed just as I wanted to but when I tried to print from oracle apps it only printed up to about 3/4 width of the paper. I tried to change the report's height and width, paper size, orientation but no luck. What should I do? Thanks

  • What are the characteristics of the sound output from the speaker iPad3?

    What are the characteristics of the sound output from the speaker iPad3?

    man -s4 proc
    or
    http://docs.sun.com/app/docs/doc/817-0683/6mgff29c4?q=procfs&a=view
    Its a virual directory structure with a directory per process. These per process directories contain more directories and files that supply detailed information on that process eg per open file information.
    Access to the per process directories is controlled by checking the credentials of the accessing process against the credentials of the
    process whose procfs directory is being accessed.
    tim

  • Trying to understand what are the parameter/output From debug SNMP timers

    Hi All
    I am trying to understand what are the parameter/output
    From the debug SNMP timers
    Output SNMP timers :
    *Dec 31 11:56:27: SNMP: HC Timer 632DDE28 fired
    *Dec 31 11:56:27: SNMP: HC Timer 632DDE28 rearmed, delay = 5000
    *Dec 31 11:56:32: SNMP: HC Timer 632DDE28 fired
    *Dec 31 11:56:32: SNMP: HC Timer 632DDE28 rearmed, delay = 5000
    *Dec 31 11:56:37: SNMP: HC Timer 632DDE28 fired
    *Dec 31 11:56:37: SNMP: HC Timer 632DDE28 rearmed, delay = 5000
    *Dec 31 11:56:38: SNMP: HC Timer 70B54A70 fired
    *Dec 31 11:56:38: SNMP: HC Timer 70B54A70 rearmed, delay = 20000
    70B54A70 , 632DDE28 „² what this number means.
    5000 , 20000 „² why I have different delay time ( does it means that I have delay for SNMP request )

    The debug messages you are seeing are related to High-Capacity (HC) timers, which manage updates to 64-bit (HC) snmp counters as defined in RFC2233.
    The "fired" and "rearmed" messages indicate when each of these timers
    updates ("fired") the HC snmp counters, and when they should fire next
    (the "rearmed" messages). Higher speed interfaces require updates more often than lower speed interfaces, so you see two examples of that in your debug messages - 5000 ms updates vs 20000 ms update.
    The numbers that are in the messages (i.e. 632DDE28 ) are internal references to the timer that has fired.
    These messages do not indicate any delay in SNMP message processing, but normal SNMP operation of HC counters.

  • Anyway to supress the coulmn names in the query output from SQLPLUS

    Hi,
    I am using sqlplus to run a script which returns the results with column names.
    Is there anyway to omit the column names from the query output from sqlplus?
    I would like to have only results with out their column names in the output.
    Thanks in advance!!

    Hi,
    Maybe your LINES(IZE) isn't set ?
    SCOTT>set lines 130
    SCOTT>select status, machine, module
      2    from v$session
      3   where upper(username) = 'SCOTT';
    STATUS   MACHINE                                                          MODULE
    INACTIVE PFAE3\VPC4894-03                                                 TOAD 9.7.2.5
    ACTIVE   PFAE3\VPC4894-03                                                 SQL*Plus
    2 rows selected.
    SCOTT>As an alternative to setting linesize, you can format columns:
    SCOTT>set lines 80
    SCOTT>col status for a8
    SCOTT>col machine for a30
    SCOTT>col module for a30
    SCOTT>select status, machine, module
      2    from v$session
      3   where upper(username) = 'SCOTT';
    STATUS   MACHINE                        MODULE
    INACTIVE PFAE3\VPC4894-03               TOAD 9.7.2.5
    ACTIVE   PFAE3\VPC4894-03               SQL*Plus
    2 rows selected.
    SCOTT>Regards
    Peter

  • Printing the pick list from the delivery automatically

    Hi All,
    Please let me know how to do the : Printing the pick list from the delivery automatically ?
    Thanks in advance.
    Regards,
    Nagaraju.

    hi,
    execute VL70.
    balajia

  • Want to print the stack trace from the code

    looking for a way to print the stack trace from the CVI code.
    Thanks!

    First I would share the movie. If I was making a DVD, I would use SHARE/To Media Browser in LARGE size.
    Then I would use a free application called MPEG Streamclip,
    Get MPEG Streamclip, which is free. (google MPEG Streamclip from Squared 5)
    Open MPEG Streamclip.
    In the Finder, go to Movies/iMovie Projects, and right click on your project. Then, right-click/Show Package Contents. Navigate to the Movies folder in the package and find the LARGE movie. (Note: you are in the bowels of the Media Browser)
    Drag this movie into MPEG Streamclip. (It will not actually move anywhere. This tells MPEG Streamclip how to find it.)
    In MPEG Streamclip, move the playhead to the frame you want.
    In MPEG Streamclip, click FILE/EXPORT FRAME.
    Choose JPEG, TIFF, or PNG and give it a name.
    You can then drag this photo into iPhoto, iDVD, or wherever you need it.
    (Assuming you already know this) In iDVD, you can find the Media Browser at the lower right of the Window. Navigate to your project and drag it into iDVD.

  • We have an imac 27, with 2 accounts.  We share a Canon 9000 II printer, wired..  If my wife prints a photo it printes perfectly  When I print the same pic from my  account, overall dark magenta cast. Ideas????

    We have an iMac 27, wife and I each have an administrator account.  When she prints a pic from iphoto, or from  the web, the colors are perfect, they match the monitor.  When i print the same pic from my account, there is a dark magenta cast overall.  Same printer, same driver, same paper.  Using a Canon 9000series II printer, connected by wire.  This is a new phenomenon.  Using new inks, cartridges are full, all lit.  Any ideas what could be causing this weird phenomenon???

    When i print the same pic from my account, there is a dark magenta cast overall. 
    what happens when you print from your wives account?
    This is a new phenomenon. 
    When did this start, when you installed a new OS, applications, new Mac?
    A first step is to reset the printer from your account:
    Apple Menu > System Preferences > Printers: right click in the list of printers and select Reset Printing System

  • Can I put ALL the sound output from my iMac through Airport?

    Just got Airport Express, and managed to install it very quickly on my existing Belkin network. Just don't forget the $ before your WEP key.
    Does anyone know if its possible to put ALL the sound output from my iMac through to Airport, rather than just iTunes? So internet radio, streaming videos etc?

    Thanks matey - that's just what I was after.
    Not sure if that will also let me put my iMac's system sounds through my HiFi - probably not - but then who in their right mind could possibly want to...?
    (Be nice if you could though)

  • Yesterday suddenly the sound output from my Headphone is not working

    Hi, I've Mac Book Pro 15" with Retina display. Yesterday suddenly the sound output from my Headphone is not working. When I tried to solve this, I've noticed in system preferences it's jumping from Internal speakers to Head phone and vice versa. Can anyone help me on this issue please? I am using the original Apple Headset only.
    Thanks
    Babu
    <Re-Titled By Host>

    Tell us:
    OS X version ?
    What may have changed prior to the onset of the issue of "... suddenly... not working..." and " ... preferences ... jumping from ..." ? Software added, upgraded, updated?
    what precidely do you mean by " ... preferences ... jumping from ..." ?
    ÇÇÇ
    EDITadded
    I see that your Question has languished for some period of time without response. You have posted your issue in Using Apple Support Communities whose topic is 'How to use this forum software's interface, features and/or how to find what you wish'. It is a relatively low traffic and inappropriate forum for your problem. I will ask our Hosts to move it to " MacBook Pro " where it may get a more rapid response from your fellow users.
    endEDIT

  • Is the raw output from JSP and XSQLServlet the same?

    Hi
    Is there is difference between the raw output from XSQLServlet and JSP? For example, assuming the same content is being generated, is there some additional header information emitted by XSQLServlet that is not done by JSP?
    I am using software that successfully consumes generated content from a JSP OK, but the same content (using the same XML/XSL) generated from XSQLServlet is being rejected. I am puzzled by this. Maybe this is due to some differences in servlet output or an encoding issue? The content is not HTML but XML-like with an "application" contentType, like Steve's SVG example.
    It seems that XSQLServlet is showing some data prior to emitting the actual content, i.e. HTTP version, responding server version, content type and date, e.g.
    HTTP/1.0 200 OK^M
    Server: Resin/2.0.5^M
    Content-type: application/x-sky; charset=UTF-8^M
    Date: Thu, 28 Mar 2002 06:45:34 GMT^M
    ^M
    (then the generated content)
    Is this preamble usually generated by a JSP also?
    If not, can this information be turned off, or put another way, can XSQLServlet's raw output be set to be exactly like JSP? If not, is there a workaround?
    I have tried setting the following XSQLConfig.xml
    <suppress-mime-charset> for the mime-type &
    <character-set-conversion>
    <none/>
    </character-set-conversion>
    also, but to no avail.
    Please help! I really want to use XSQLServlet!
    Thanks.
    Michael.

    Yes, just less fine control over the process but the same engine.
    Regards
    TD

  • NOT Able to print the Report output in the Printer

    Hello guys
    I have a concurrent Program-which is a report.A printer is installed in Oracle apps and i have assigned that printer to the concurrent Program.Now the problem is when i run the report after giving number of copies as 1 in options button,the report is getting completed sucessfully but it is not getting printed in the printer.
    please help me in this issue.
    log message:
    Printing output file.
    Request ID : 56734501      
    Number of copies : 1      
    Printer : xx-printer
    Finished executing request completion options.
    thanks

    Pl post your OS and EBS versions and pl confirm that you can print the file to the printer from the OS level using OS commands.
    MOS Doc 297522.1 - How to investigate printing issues and work towards its resolution ?
    HTH
    Srini

  • 4650dn printer changing document output from print preview

    recently installed 4650dn printer set up was a breeze, then suddenly the printer started changing the document output like there was an internal setting overriding the software settings.  almost as if it was confused about the orientation of the paper.  i am running vista with the print driver PCL 5.  i have tried restoring factory settings, tried different software, finally got it to work in MS word but prefer to use MS publisher, adobe illustrator etc.

    Hi Narasimhan,
    Yes, your guess is correct. We have tried out the possibility of controlling the print from the user status configuration side of things, but as the user status is at an Operation level, the system status at the header level still gets set, confusing the user that a print was created.
    Any other ideas / alternates ?
    Cheers,
    Ashok.

  • Printing the list output.

    Hi All,
    I want to print the output of the report. I am printing it using NEW-PAGE PRINT ON . and concluded by NEW-PAGE PRINT OFF. I am doing this under the usercommand.  The problem is,, when I say print,(user command), I can print the output but the it is leading to the previous screen. I want to be in the same screen after my printing. I am pasting the code also. Can any one suggest me, where I am doing the mistake.
    <b><REMOVED BY MODERATOR></b>
    CASE P_UCOMM1.
        WHEN 'PRINT11'.
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
              COPIES         = '1'
              DESTINATION    = 'LOCL'
              IMMEDIATELY    = 'X'
              LINE_COUNT     = 25
              LINE_SIZE      = 132
              NO_DIALOG      = 'X'
              USER           = SY-UNAME
              ABAP_LIST      = 'X'
            IMPORTING
              OUT_PARAMETERS = L_PARAMS
              VALID          = L_VALID.
    &--'REUSE_ALV_HIERSEQ_LIST_DISPLAY'--
          DATA:FLAG(1).
          CLEAR FLAG.
          IF L_VALID <> SPACE.
            NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG.
            CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
              EXPORTING
                I_CALLBACK_PROGRAM       = GD_REPID
               I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET1'
               I_CALLBACK_USER_COMMAND  = 'EXEC'
                IS_LAYOUT                = M_LAYOUT
                IT_FIELDCAT              = I_FLDCATALOG
                IT_EVENTS                = I_EVENTS
                I_TABNAME_HEADER         = 'I_MHEAD'
                I_TABNAME_ITEM           = 'I_MITEM'
                IS_KEYINFO               = M_KEYINFO
              TABLES
                T_OUTTAB_HEADER          = I_MHEAD
                T_OUTTAB_ITEM            = I_MITEM.
            REFRESH I_FLDCATALOG.
            CLEAR M_LAYOUT.
            CLEAR M_KEYINFO.
            NEW-PAGE PRINT OFF.
            CLEAR L_PARAMS.
            CLEAR L_VALID.
          ENDIF.
          LOOP AT I_HITEM INTO W_HITEM.
            IF W_HITEM-CHECK = 'X'.
              W_HITEM-PFLAG = 'PRINTED'.
              MODIFY I_HITEM FROM W_HITEM INDEX SY-TABIX TRANSPORTING PFLAG
            ENDIF.
          ENDLOOP.
          IF SY-SUBRC = 0.
            LOOP AT I_PFLAG INTO W_PFLAG.
              UPDATE RESB SET WEMPF = 'X'
                          WHERE AUFNR = W_PFLAG-AUFNR
                            AND MATNR = W_PFLAG-MATNR
                            AND DUMPS = 'X'.
              COMMIT WORK.
              WAIT UP TO 1 SECONDS.
            ENDLOOP.
          ENDIF.
      ENDCASE.
    Thanks
    Ramesh.
    Message was edited by:
            Alvaro Tejada Galindo

    Hi,
    When you get the list output .
    click on print button to print it. A dialog box will come.
    In that dialog box, there will be settings button . when you click on this button, you will get many options and the value of those options that can be set defualt for that report output.
    In that there is s option of printer , select that option  and enter a value and then set that as default.
    I hope this will solve your problem.
    For any more help, please revert back.
    Thanks and regards
    Gurpreet Singh

Maybe you are looking for

  • Extremely Urgent : Transport of KM Content through ICE Protocol

    Hello Friends, This is really urgent. I have been transporting XML content in KM folders through ICE protocol. But of late the problem is that I am able to download the KM foledrs in .zip format in my Desktop but of late when I am trying to upload it

  • Transfering data from iPhone 4 to 4s

    I had a disaster with my iPhoto library and am slowing recovering pictures which are now a huge mess. In the midst of this my new iPhone 4s will arrive today. My current iPhone 4 has a large number of pictures properly organized. My question is provi

  • Ripping a DVD that was recorded in VR format

    I've made dozens of DVDs on a Phillips set-top DVD recorder, using DVD+R media. Now, I want to rip them (using Handbrake) so I can watch them on my Apple TV through iTunes. Problem is, Mac won't read the disk. Simply says "You've inserted a blank dis

  • SRM 7 - central contract different webdynpro screen

    Hello, I'm on an SRM 7 SP05 system. When i open a central contract via the strategic purchasing -> contract management -> POWL (click on number) the document is shown in light blue the loading bar and screen colors are different from all the other sc

  • Subcontracting availibility check on make to order stock

    Dear All, I have a material let's say  'X' which with a BOM/routing which includes a subcontracting step of material "Y" which is a also a make to stock item. When I create a sales order for material X and run a Plannings run I first produce material