Sorting program

i have no clue what is wrong with this. please help. i think its something wrong with my methods...
public class bubbleSort4{
  public static void main (String []args){
    bubbleSort4(x);
    for (int y=0; y<x.length-1; y+=1){
      System.out.println(work[y]);
    }//end of for
  }//end of main
public static void bubbleSort4(int[] x) {
  x={23, 36, 47, 2, 34, 5, 6, 7, 8, 9, 100, 6};
  int newLowest = 0;            // index of first comparison
    int newHighest = x.length-1;  // index of last comparison
    while (newLowest < newHighest) {
        int highest = newHighest;
        int lowest  = newLowest;
        newLowest = x.length;    // start higher than any legal index
        for (int i=lowest; i<highest; i++) {
            if (x[i] > x[i+1]) {
               // exchange elements
               int temp = x; x[i] = x[i+1]; x[i+1] = temp;
if (i<newLowest) {
newLowest = i-1;
if (newLowest < 0) {
newLowest = 0;
}//end of if
} else if (i>newHighest) {
newHighest = i+1;
}//end of else if
}//end of if
}//end of for
}//end of while
}//end method bubbleSort4
}//end of class

fixed it up! thanks a lot guys
public class bubbleSort4{
  public static void main (String []args){
    int [] arrayx= {23, 36, 47, 2, 34, 5, 6, 7, 8, 9, 100, 6};
    bubbleSort4(arrayx);
    for (int y=0; y<arrayx.length-1; y+=1){
      System.out.println(arrayx[y]);
    }//end of for
  }//end of main
public static void bubbleSort4(int[] arrayx) {
  int newLowest = 0;            // index of first comparison
    int newHighest = arrayx.length-1;  // index of last comparison
    while (newLowest < newHighest) {
        int highest = newHighest;
        int lowest  = newLowest;
        newLowest = arrayx.length;    // start higher than any legal index
        for (int i=lowest; i<highest; i++) {
            if (arrayx[i] > arrayx[i+1]) {
               // exchange elements
               int temp = arrayx; arrayx[i] = arrayx[i+1]; arrayx[i+1] = temp;
if (i<newLowest) {
newLowest = i-1;
if (newLowest < 0) {
newLowest = 0;
}//end of if
} else if (i>newHighest) {
newHighest = i+1;
}//end of else if
}//end of if
}//end of for
}//end of while
}//end method bubbleSort4
}//end of class

Similar Messages

  • Simple sorting program for folders/files

    Hello comunity,
    I would like to make a simple sorting program which will scan through some folder looking for files with different extensions. Then copy files of the same format (example *.pdf) and (create) place them into folder with the name of the extension. After that the program (script) should look for another extension and do the similar operation to them untill all files will be moved. I am new to applescript and automator.app, so could you please put me on the right direction which programmin (script) language should I use. Sample code and good tips would be usefull too. Thank you for your time.

    This is not a hard thing to do. If you want to write it yourself, and have some background in programming, I recommend to read a book on AppleScript and start writing the code in AppleScript Editor.
    The AppleScript Language Guide is a free reference book by Apple which you can download it. There are a lot of sample codes on the net too.
    You should use the Finder dictionary to do this work. Finder is a scriptable application in Mac, which has a dictionary. This dictionary describes about the objects inside the finder that do all the duties of the Finder and you can call them directly in AppleScript to automate things. Open AppleScript editor, go to Window > Library and double click on Finder. This will open the dictionary. Note that all the objects in scriptable applications have a hierarchical relationship, starting from the root "application" object. You can read the dictionary to get familiar with the objects in the Finder app and know how to use them.
    Here is some code:
    tell application "Finder"
      tell the front window
      log (count of items of it)  -- prints the count of items in the window
      make new folder in it with properties {name:"mani"} -- makes a new folder named: mani
      make new file in it with properties {name:"test", extension:"txt"} -- makes a new text file
      repeat with x in every file in the items of it
          log the name of x
      end repeat
      end tell
    end tell
    If you can program in Objective-C and not have enough time to learn AppleScript, you can use Scripting Bridge technology to automate scriptable applications using Objective-C. This is so much better because enables you to debug your code or execute it line by line, which is not possible when working with AppleScript Editor.
    Hope this helps

  • I have been thrilled to use file sharing for tv programs on my home pc and watch on the ipad, i am having trouble finding out how to sort programs in any correct order, any help?

    I have been thrilled to use file sharing for tv programs downloaded on my home pc.  I have not been able to sort the program list on the ipad2 to make the list appear in order of showtime or live appearence.  Any suggestions?

    I have been thrilled to use file sharing for tv programs downloaded on my home pc.  I have not been able to sort the program list on the ipad2 to make the list appear in order of showtime or live appearence.  Any suggestions?

  • Sort program

    Hi if anyone can tell me how can i make a program that sorts a simple integer vector of 5 elements or 55. It should be sorted in an ascending order.
    Thanks

    Read the API for [url http://java.sun.com/j2se/1.4/docs/api/java/util/Arrays.html]Arrays.

  • Field Specific Sorting on Hexadecimal data

    Hi,
    Has anyone implemented a sorting of Hexadecimal structure data based on any order of key or non-key fields?
    I have an internal table ITAB1, of structure of a table T1 (determined at run-time, no way of knowing the structure beforehand). I transfer valyes of ITAB1 to ITAB2 which is of Hexadecimal type of structure T1. Now, I use ITAB2 on list display.
    How do I sort the entries of ITAB2 based on any field of T1, determined at run-time? Any ideas?
    Any helpful answer will be greatly appreciated, points assured!
    Regards,
    Rekha

    Hai,
    If a sort criterion is not known until runtime, you can use SORT itab BY ... (name) ... to specify it dynamically as the contents of the field name . If name is blank at runtime, the sort criterion is ignored. If name contains an invalid component name, a runtime error occurs.
    You can use offset and length specifications to further restrict sort criteria, regardless of whether they are specified statically or dynamically.
    If itab is an internal table with a header line, you can also use a field symbol pointing to the header line of itab as a dynamic sort criterion. If the field symbol does not point to the header line of the internal table, a runtime error occurs.
    Note
    Performance
    The runtime required to sort an internal table increases with the number of entries and the width of the sort key.
    Sorting an internal table with 100 entries and the 50-byte wide default key would take about 1300 msn (standardized microseconds). A 30-byte wide sort key would need about 950 msn.
    If one of the specified sort criteria is itself an internal table, the SORT may sometimes take longer.
    Runtime errors
    SORT_ITAB_FIELD_INVALID :A field symbol used as a dynamic sort criterion does not point to the header line of the internal table to be sorted.
    SORT_TOO_MANY_FIELDS : More than 250 sort criteria.
    Related APPEND ... SORTED BY
    Variant 2
    SORT.
    Additions
    1. ... DESCENDING (similar to variant 1)
    2. ... ASCENDING (similar to variant 1)
    3. ... BY f1 f2 ... fi
    4. ... BY fg
    Effect
    Sorts the dataset generated with EXTRACT by the fields in the field group HEADER (see FIELD-GROUPS ).
    Here, blank fields (i.e. fields not defined with EXTRACT ) are inserted before all non-blank fields, regardless of whether the sort sequence is in ascending or descending order.
    Notes
    The number of sort criteria is restricted to 50.
    As with variant 1, any sequence of fields you specify for sorting purposes does not remain fixed. Any sequence of records which belongs to different field groups, but has the same HEADER field contents, is arbitrary.
    Again like variant 1, sorting takes place in main memory if at all possible. If there is insufficient space there, ABAP/4 calls an external sort program. You can modify the directory used to create the temporary auxiliary file by modifying the SAP profile parameter DIR_SORTTMP .
    As soon as a dataset has been processed with SORT or LOOP ... ENDLOOP , you cannot extract any more records with EXTRACT .
    Addition 3
    ... BY f1 f2 ... fi
    Effect
    Can sort only by fields in the field group HEADER .
    Otherwise, the effect is similar to variant 1.
    Addition 4
    ... BY fg
    Effect
    Sorts by the fields in field group fg .
    However, the only fields which can be sorted are those in the field group HEADER , i.e. the field group fg can consist only of fields from the field group HEADER (see INSERT ... INTO ).
    Example
    DATA: ONR(7), DATE TYPE D, POSITION(3) TYPE N,
    CUSTOMER(16),
    PNR(5) TYPE N, NAME(10), UNITS TYPE I,
    ORDERS TYPE I.
    FIELD-GROUPS: HEADER, ORDER, PRODUCT, DATE_FIRST.
    INSERT ONR DATE POSITION INTO HEADER.
    INSERT CUSTOMER INTO ORDER.
    INSERT PNR NAME UNITS INTO PRODUCT.
    INSERT DATE ONR POSITION INTO DATE_FIRST.
    ONR = 'GF00012'. DATE = '19921224'.
    POSITION = '000'. CUSTOMER = 'Good friend (2.)'.
    EXTRACT ORDER.
    ADD 1 TO POSITION.
    PNR = '12345'. NAME = 'Screw'. UNITS = 100.
    EXTRACT PRODUCT.
    ADD 1 TO POSITION.
    PNR = '23456'. NAME = 'Nail'. UNITS = 200.
    EXTRACT PRODUCT.
    ONR = 'MM00034'. DATE = '19920401'.
    POSITION = '000'. CUSTOMER = 'Moneymaker'.
    EXTRACT ORDER.
    ADD 1 TO POSITION.
    PNR = '23456'. NAME = 'Nail'. UNITS = 300.
    EXTRACT PRODUCT.
    ADD 1 TO POSITION.
    PNR = '34567'. NAME = 'Hammer'. UNITS = 4.
    EXTRACT PRODUCT.
    ONR = 'GF00011'. DATE = '19921224'.
    POSITION = '000'. CUSTOMER = 'Good friend (1.)'.
    EXTRACT ORDER.
    ADD 1 TO POSITION.
    PNR = '34567'. NAME = 'Hammer'. UNITS = 5.
    EXTRACT PRODUCT.
    SORT BY DATE_FIRST.
    LOOP.
    AT ORDER.
    WRITE: /, / DATE, ONR, POSITION,
    CUSTOMER, 'ordered:'.
    ENDAT.
    AT PRODUCT.
    WRITE: / DATE, ONR, POSITION,
    PNR, NAME, UNITS.
    ENDAT.
    ENDLOOP.
    This generates the following output:
    01041992 MM00034 000 Moneymaker ordered:
    01041992 MM00034 001 23456 Nail 300
    01041992 MM00034 002 34567 Hammer 4
    24121992 GF00011 000 Good friend (1.) ordered:
    24121992 GF00011 001 34567 Hammer 5
    24121992 GF00012 000 Good friend (2.) ordered:
    24121992 GF00012 001 12345 Screw 100
    24121992 GF00012 002 23456 Nail 200
    Note
    Performance
    The runtime required to sort an internal table increases with the number of entries and the width of the sort key.
    Note
    Runtime errors
    SORT_EXTRACT_TOO_MANY_FIELDS : More than 50 sort criteria
    SORT_FIELD_NOT_IN_HEADER : Sort criterion not in field group HEADER
    SORT_NO_HEADER : Field group HEADER not created
    SORT_WITHIN_LOOP : SORT on extract dataset within LOOP on extract dataset
    Thanks,
    Swetha Singh

  • How to sort a string as integer

    Hi,
    I need to sort some log files which got timestamps as below:
    1149807013000 this is line no 1
    1149807023000 this is line no 2
    I am converting the date time stamp of the log file to Date.getTime() in a ArrayList and then want to sort this so that i will get them sorted from oldest timestamp to new.
    I am using Collections.sort(ArrayList) method, but it is sorting them as String. As this is simple array would it be possible to tell the sort program to sort as Numeric ?. I donot know how to write comparator for this kind of Array, any help here appreciated.
    Thanks, Mani

    I am posting my method here:
    public static void sortLogs(ArrayList al, JTextArea txa){
            Date t;
            SimpleDateFormat formatter;       
            ArrayList al2=new ArrayList();
            for (int i=0;i < al.size();i++) {
                File file=new File(al.get(i).toString());
                if (file.exists()){
                    if ( file.getName().startsWith("sys_log")){
                        //Jun 26 12:40:51 2006 BoxMonitor:3:526 enclosure 2 failed to respond to ping at management switch
                        //MMMsDDsTIMEsYR_data
                        try{
                            BufferedReader in=new BufferedReader(new FileReader(file));
                            String line=null;
                            formatter=new SimpleDateFormat("MMM dd HH:mm:ss yyyy",new Locale("en", "US"));
                            while ( (line=in.readLine())!=null){
                                Pattern p=Pattern.compile("^([JFMASOND][aepuco][nbrylgptvc])\\s+([\\d]+)\\s+([\\d]+[:][\\d]+[:][\\d]+)\\s+([\\d]+)\\s+(.*)");// \\s+(.*)");
                                Matcher m=p.matcher(line);
                                if (m.find()){
                                    t=formatter.parse(m.group(1)+" "+m.group(2)+" "+m.group(3)+" "+m.group(4));
                                    al2.add(t.getTime() + " "+file.getName()+" " + m.group(5));                               
                        }catch(Exception ex){
                            System.err.println("Error on file "+file.getPath()+ " error is "+ ex.getMessage());
            if ( al2.size() > 0) {
                t=new Date();
                formatter=new SimpleDateFormat("MMM dd HH:mm:ss yyyy",new Locale("en", "US"));
                Collections.sort(al2);    //once arraylist al2 is populated with all the files, want to sort which contains String lines like 102020000 filename data
                Pattern p=Pattern.compile("^(\\d+)\\s+(.*)");
                Matcher m;
                for (int j=0;j< al2.size();j++){
                    m=p.matcher(al2.get(j).toString());                          
                    if ( m.find()) {
                       t.setTime(Long.parseLong(m.group(1)));
                       txa.append(formatter.format(t)+" "+m.group(2)+"\n");                               
        }I am using Collections.sort. As you can see here i am perl guy trying to port my script to java. Was using unix sort on my perl script, but here i am stuck :-).
    The ArrayList populated here from reading the text files - finding the date pattern - converting to ephoch seconds, and then i need to sort before converting back to normal date. When i verified the sort output, i see sorting like below:
    1
    100
    2
    20
    where as in numeric i would like to see,
    1
    2
    20
    100
    Thanks for your help.

  • Wanted: photo sorting software

    I need some guidance as to suitable photo-sorting software. I'm pretty sure iPhoto isn't what I want, but I thought this forum the best place to ask.
    I am generating audio-visuals in Adobe Premiere, mostly consisting of scanned slides. The images are mostly scanned slides in multi-layered Tiff format, typically about 100 MB. Before jumping into Premiere, I'd like to pre-sort the images. Typically, the images might come from a dozen folders and number anywhere from 50 to 500. Some considerations:
    I don't want to alter my existing folder structure.
    I don't want the software to copy the images, just link to them. I could handle the software making reduced-size, preview copies, say in jpeg format.
    I don't need to edit, add metadata, upload, share, run a slideshow or do anything with the images other than sort them and look at them.
    I need to be able to save the "Sort" as a file so I can back it up. What I mean by the "Sort" file is the data that allows the images to be sorted, not the actual images. The saved "Sort" would be a very small file.
    To sum up: I'm looking for image-shuffling software. Adobe Bridge is very good, but fails point 4. I can't save the "Sort" file except via copying some folder buried ten folders deep. And Bridge seems to copy the images and thereby clog my system.
    Any suggestions?

    Thanks for the responses.
    Terence: I probably should have used the word "shuffle' instead of sort. By "Sort" I mean the order in which the slides appear: slide 1, slide 2, slide 3…
    A particular show might have, say, 500 slides from 37 different folders on my hard drive. I want to be able to drag them one-by-one into a window and arrange them in order. The process may extend over several weeks as slides are added or removed, so I want to be able to back up the "Sort". For instance, so that a friend can work on the "Sort" on their computer.
    Once the "Sort" is finalised, that's it for the sorting program. I don't want to renumber the images and export to USB stick, like you might do for a manual slide presentation, because the slides are already indexed in a database so I can find them easily. For example, if I'm looking for a slide of Lake Pedder, dated before 1970, taken by John Pickford, I can find them in a few seconds by searching the database. One of those slide might have the label PiJ27, which tells me it's slide #27 located in the Pickford J folder.
    The next step is to type the slide labels into the script:
    [PiJ27]  "Lake Pedder in Tasmania's south-west was…"
    [RG83]  "But now it's not there no more…"
    Then I manually import the slides into Premiere and dump them into the Timeline.
    So, it's a slide-shuffling program I'm looking for. Sorting, as such, doesn't come into it.

  • Hmm,. another sorting, radix sorting help

    how can i possibly code a radix sort program that shows an output in every pass?? i have search the net but almost a lot of them does have an output of already sorted array.

    skyassasin16 wrote:
    how can i possibly code a radix sort program that shows an output in every pass??By sprinkling a bunch of System.out.println's in your code.
    i have search the net but almost a lot of them does have an output of already sorted array.Then change them if the source is available.

  • Sort differences

    A Linux-using friend asked for help creating a script to sort files numerically on the 2nd comma-delimited field of a set of Ascii files. So, at home on my Mac, I consulted the man page and came up with the following, which works just fine:
    sort -t, -k2n filename
    However, it doesn't work on Linux, where it doesn't complain about anything, it just doesn't sort correctly. The Linux man pages seem to support this set of options. (Yeah, I know, it's not Linux, but the sort program that's at issue. And this is a Mac forum, not a Linux one.) The Mac sort is from GNU while the two Linux (Ubuntu and Red Hat) sorts are from FSF.
    Could this simply be chalked up to an FSF sort bug?
    If anyone cares to play with this, here is some test data.
    xyz,5,abc
    asdfa,3,asdfads
    werttwrwrtwtr,2,43234545
    a,4,z
    qqqqq,10,zzzz

    Hi Ken,
    Your post is quite interesting. The command line syntax of the sort command is quite complilcated and always a headache to me. The following are what I have found:
    (1) It is always safer to specify the sort key as -k2,2 (not -k2). If you specfy just -k2 then it means "from the 2nd field to the end of the line". So
    sort -t, -k2,2n filename
    should give the desired result (both in Linux and MacOSX).
    (2) GNU and FSF are "virtually" the same thing (FSF supports GNU project). The sort command in Tiger is from GNU but quite old
    Tiger$ sort --version
    sort - GNU textutils 1.14
    The ones in (recent) Linux distros are also from GNU but much newer (textutils 2.x or coreutils, which is the successor of textutils).
    (3) Older sort commands (like the one in Tiger) do not consider comma "," as part of a number. But newer ones can recognize the "thousands separator", with locale support. "Locale supoort" means that the values of the "decimal point" and the "thousands separator" depend on the locale (for example, French locale uses different values than many other locales.) If no locale is specified then it behaves as the older version, so
    Linux$ LC_NUMERIC=C sort -t, -k2n filename
    would work (but better to use -k2,2n).
    (4) The newer sort also has the -g option. This can handle scientific notation like "6.022e-23", but slower than -n and can be affected by the rounding error. It seems -g does not support the "thousands separator".
    (5) Sometimes (not always) "info sort" gives more recent (or detailed) description of the command than "man sort".

  • Alphabetical order of itunes

    Alphabetical order typically is organized numbers first, followed by A-Z. itunes organizes this way in all situations except when a number begins the name of an artist. How can I organize my artists alphabetically so that artists beginning with a number will come first then artists A-Z?
    For example: alphabetically the artist "311" should come before the artist "Abandones Pools" and I would like it to be this way. Right now, "311" shows up after the artist "Zero 7". However, the artist "M83" shows up before the artist "Mae". I want the number to come first alphabetically in all situations. How do I do that?

    "+Alphabetical order typically is organized numbers first, followed by A-Z+"
    There is no 'typical'. Different computer systems use differing character-sets that have letters first or numbers first. This can based on their ASCII numerical value or a customized sort program within the software.
    I do not believe that you can change the way iTunes internally sorts the data.
    You can, however, manage the 'Sort Artist' &/or 'Sort Album' fields for any song file (or group of files). You may have to be creative to get the numbers 'floating' to the top of the sort. i.e. - Putting a leading character such as a '.' in front of the numeric Artist or Album. Figure it out for yourself if it is truly important to you.
    Best of Luck

  • Wierd Array Error

    So I was making a simple selection sort program that would read in an array and then sort it using the aforementioned method and received a very strange error. I have made similar programs before and never encountered this error and cannot find what has went wrong. Any assistance is appreciated. Here is the code and error.
    import java.util.Scanner;
    public class Q1assignment5
    public static void main (String[] args)
    int i, j, N = 0;
    int [] a = new int[N];
    Scanner keyb = new Scanner(System.in);
    System.out.print("Enter the number of integers you want in the array");
    N = keyb.nextInt();
    System.out.println ("Enter the integers to be sorted: ");
    for (i=0;i<a.length;i++)
    a[i] = keyb.nextInt();
    System.out.println ("The array sorted looks like this: ");
    for (i=0;i<N;i++)
    for (j=(i+1);j<N;j++)
    if (a> a[j])
    int temp = a[i];
    a[i] = a[j];
    a[j] = temp;
    for (i=0;i<N;i++)
    System.out.print (a[i] + " ");
    And the out put/error
    --------------------Configuration: <Default>--------------------
    Enter the number of integers you want in the array 6
    Enter the integers to be sorted:
    The array sorted looks like this:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
    at Q1assignment5.main(Q1assignment5.java:29)
    Process completed.
    It is skipping the assignment loop so I believe the problem is located in the first for loop, but cannot see where.
    Edited by: BinaryReaper on Nov 25, 2008 7:06 PM
    Edited by: BinaryReaper on Nov 25, 2008 7:13 PM

    Here is the Exact error
    "Cannot find symbol variable N" that is shown 5 times on line 19 20 25 27 37
    import java.util.Scanner;
    public class Q1assignment5
      public static void main (String[] args)
           int i, j;
        Scanner keyb = new Scanner(System.in);
        System.out.print("Enter the number of integers you want in the array");
        N = keyb.nextInt();
        int [] a = new int[N];
        System.out.println ("Enter the integers to be sorted: ");
        for (i=0;i<a.length;i++)
         a[i] =  keyb.nextInt();
        System.out.println ("The array sorted looks like this: ");
        for (i=0;i<N;i++)
          for (j=(i+1);j<N;j++)
               if (a> a[j])
         int temp = a[i];
    a[i] = a[j];
    a[j] = temp;
    for (i=0;i<N;i++)
    System.out.print (a[i] + " ");
    }Edited by: BinaryReaper on Nov 25, 2008 7:55 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Class implementation for interface

    Hello,
    I am a beginner in ABAP Objects.
    In the coding of method if_swf_ifs_workitem_exit~event_raised of class CL_SWF_UTL_EXIT_NEW
    There is the instruction follow :
    *Get the workflow container
    irh_container ?= im_workitem_context-> get_wf_container()
    Im_workitem_context is interface type  "IF_WAPI_WORKITEM_CONTEXT"
    If I execute in debug mode I see the implemtation class of this interface (im_workitem_context)  is "CL_SWF_RUN_WORKITEM_CONTEXT"
    But where this information of implementation is defined ? (I saw nothing)
    Regards
    Christine
    Edited by: chris_75 on Sep 7, 2010 4:22 PM

    Interfaces allow to implement highly scalable object oriented applications.
    Interface is a kind of a template for a real class which forces this class to implement methods defined in an interface.
    The main characteristics of an interfaces are:
    - they DO NOT contain any implementations (so there is nothing like INTERFACE ... IMPLEMENTATION - they have only DEFINITIONS - implementations are within classes)
    - they have only PUBLIC sections.
    Why we need an interface. The answer is simple:
    We want to handle some objects uniformly from one application compotent, whereas these objects may behave differently inside.
    Example:
    Let's say we need to build a sorting program for numbers.
    The program would have an interface variable L_RIF_SORTER of an interface LIF_SORTER. LIF_SORTER has a method definition SORT with an C_TAB changing parameter.
    Sorting application would call the sorting algorithm as follows:
    L_RIF_SORTER->SORT( CHANGING c_tab = l_tab ).
    Now is the main point:
    We want to have 2 kinds of sorting algorithms implemented, let's say BUBBLE SORT and QUICK SORT.
    To do so, we implement 2 classes: LCL_BUBBLE_SORT and LCL_QUICK_SORT.
    Both classes implement interface using the statment INTERFACES in a public section.
    The user would have to choose the algorithm from an input field. Depending on the content of this field the sorting application would instantiate one class or the other using the statement:
    CREATE OBJECT l_rif_sorter TYPE (variable_with_class_name).
    THis is the point where ABAP gets to know the real object and its type behind the interface.
    This approach is generally called the STRATEGY PATTERN. See Wikipedia for this.
    I hope I answered your question.
    Regards,

  • ABAP Knowledge

    Hi Experts,
    i am new to ABAP. i have done course from an institute but i am not having Confidence in writing programs or making Reports.
    please guide me how to gain confidence for this. I am confused and don't know where to start with to gain a good command over ABAP.
    Thanks in advance.
    Moderator Message: Move from ABAP General.
    Edited by: kishan P on Dec 16, 2011 1:40 PM

    Dear Friend
    1 )
    Buy a book ABAP IN 21 DAYS BY KEN GREENWOOD.
    for beginning..
    read each chapter .
    2 )
    try to implement basic programs and develop small logic.
    like
    print a pyramid
    print a prime number
    screen color operation (in various pyramid design)
    sorting program
    searching program
    after then switch to database operation
    start with
    create table
    change table
    then
    data insert
    data update
    data delete
    data search..
    then check all the controls like
    button
    checkbox
    drop down
    table control
    alv view
    then check how standard program looks and how it works
    then check module program
    functions
    procedures
    hope for the best
    good luck
    Avirat Patel

  • GREY EXCLAMATION MARK (GCOD) on my new computer

    I have one situatuion... i just got a new desktop computer
    INTEL I3 PROCESSOR
    WIN7
    8GB RAM
    EVERYTHING UP TO DATE
    And i have been experincing the Grey Exclamation Mark when i watch back to back youtubes videos for lets say anywhere
    from 30mins-1hour..... it shows and i refresh it goes away and it would come back between the time zone......
    i have all updates i uninstalled and re-installed adobe flashplayer 2 times so i have no idea if its a problem on adobe side or not?
    any ideas? I DID READ THE GCOD ADOBE RELEASED...
    ANOTHER THING IS I HAD TO PUT A CHECK IN INTERNETEXPLO. SETTING UNDER "USE SOFTWARE RENDERING INSTEAD OF GPU RENDERING" DUE
    TO A WHITE SCREEN ON SOME VIDEOS ON YOUTUBE VIEWED ON FACEBOOK.
    ANY IDEAS GUYS?

    This isn't expected behavior, nor is it widespread.  We test youtube pretty extensively (I usually start a couple 24-hour long videos when I take off every weekend on all my machines), and we have a bunch of people that do GPU compatibility testing with a wide variety of graphics cards and drivers.
    Anyway, it could be a number of things -- but it sounds like you're running out of memory.  It could be Flash, the browser, graphics drivers, a bad plug-in/toolbar or something entirely different.
    First things first, let's make absolutely sure you're running the latest player:
    1.) Go here: http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html
    2.) Make sure it says 11.4.402.287   
         If not, grab the latest from http://get.adobe.com/flashplayer
    3.) Repeat step 1
    If you have the latest, and you're still experiencing this, I'd like to see if you also see it in the latest beta, which you can grab here:
    http://www.adobe.com/go/flashplayerbeta
    If that doesn't help, let's take a look and see if it's a memory leak in Flash/MSIE:
    1. Open Task Manager by right-clicking the taskbar, and then clicking Start Task Manager.
    2. Click the Processes tab.
    3. To sort programs by memory usage, click Memory (Private Working Set).
    Just keep an eye on the memory as you surf youtube.  Does it just grow continuously until you get the Out of Memory (OOM) icon (we should be consuming several gigs at that point)?
    If it's happening and there are only a couple hundred megs in play, it might be that you're running out of GPU memory.  We'll throw the OOM icon in that instance as well.
    If that's the case, disabling Accelerated Graphics in Internet Explorer might help.
    http://support.microsoft.com/kb/2528233

  • IBM :please answer these i want to cross check my answer

    please answer these i want to cross check my answer
    1.what is oracle.
    2.what is major differenece oracle8i and oracle9i.
    4.tell me some thing ur self.
    5.please tell me about oops.
    6.what is single inheritance.
    7.what is multiple inheritance.
    8.can java support multiple inheritance.
    9.what is interface.
    10.what is differenec between abstract class and interface.
    11.how to u prove that abstrace class cannot instantiate directly.
    12.what is differenece between string and stringbuffer.
    13.what is immutable
    14.how to write a program using sort program.
    15 how to write a program using unsort program.
    16.what is legacy.
    17.what is legacy api
    18.what is legacy interface.
    19.what is main difference hashmap and hastable
    20.what is main difference between arraylist and vector.
    21.what is struts framework.
    22.what are distributed techonologies.
    23.what is advantage and disadvantage of distributed techonologies.
    24.what is main difference between jsp and servlets.
    25.what is difference between procedure and functions.
    26.what is jdbc.
    27.what are type of drivers.
    28.what is type 4 driver.
    29.how to collect requuirements form u r client.
    30.which process use in ur project.
    31.what is deployment descriptor.
    32.what is heirarchy of files in struts.
    33.please draw struts frame wrok.
    34.please draw j2ee architecture.
    35.please draw mvc-2 architecture.
    36.please draw that how design op module.
    37.how to find a file on linux.
    38.how to configure weblogic8.1 on linux.
    39.why you use struts framework in ur project.
    40.what is platfrom independent
    41.what is awt and swing.
    42.what is heavy wieght components.
    43.what is feature of weblgoic8.1.
    44.why you choose application server on linux and database server on aix.
    45.please tell me about ur project.
    46.what is major concepts in oops.
    47.why u choose mvc-2 architecture.
    48.what is implicit object.
    49.how many implicit objects in jsp
    50.why choose weblogic8.1 other than any applicationserver.
    51.what is water fall model vs sdlc
    52.what is use of dataflowdiagrams
    53.wha t is ip in ur project.
    54.what about reception module

    I was able to answer only these
    6.what is single inheritance.
    ans:one class is inherited by only other one class
    7.what is multiple inheritance.
    ans:One class inheriting more than one class at atime
    8.can java support multiple inheritance.
    ans:No
    9.what is interface.
    ans:Interface has only method declarations but no defn
    10.what is differenec between abstract class and interface.
    ans:In abstract class some methods may contain definition,but in interface every method should be abstract
    11.how to u prove that abstrace class cannot instantiate directly.
    ans:As they dont have constructor they cant be instantiated
    12.what is differenece between string and stringbuffer.
    ans:Strings are immutable where as string buffer can be modified
    13.what is immutable
    ans:Which cant be changed
    19.what is main difference hashmap and hastable
    ans:Hash table is synchronised
    20.what is main difference between arraylist and vector.
    ans:Vector is synchronised
    21.what is struts framework.
    ans:It follows MVC architecture which is used for seperating view,controller,model
    24.what is main difference between jsp and servlets.
    ans:Jsp s are mainly used for dynamic presenatations where we can write code of design and actual content seperately.mainly coding becomes feasible
    25.what is difference between procedure and functions.'
    ans:Fuctions can return value ,procedures cant return value
    26.what is jdbc.
    ans:Connecting to DB from java program requires JDBC
    27.what are type of drivers.
    type1,2,3,4
    31.what is deployment descriptor.
    ans:Which contains the infrnmation like which file to be used
    40.what is platfrom independent
    ans:A language is said to be platform independent if it can be run on any machine with out modifying code
    41.what is awt and swing.
    ans:AWT are heavy weight components and swings are light weight components
    46.what is major concepts in oops.
    ans:Abstraction,polymorphism,encapsulation,inheritance
    47.why u choose mvc-2 architecture.
    ans:In MVC-2 controller is servlet rather than JSP which makes it efficient
    48.what is implicit object.
    ans:Implicit objects are a set of Java objects that the JSP Container makes available to developers in each page
    49.how many implicit objects in jsp
    ans:out,page,session,request,response,application,page context,config

Maybe you are looking for

  • Connection problem to Oracle 11.1.0 on Windows Professional XP (SP2)

    Hello I've recently performed default installations for 3 Oracle Databases, into seperate homes on a newly formatted Windows Professional XP (SP2) standalone laptop. For all databases Oracle 10.2.0 (rover), Oracle XE (xe) and Oracle 11.1.0 (fido) I i

  • Missing video thumbnails

    Using Photoshop Elements 7 and Premier Elements 8 on a Dell Inspiron with Windows 7 which was upgraded from XP to 7 in December.  I had to uninstall both programs in order to do this.  I recently reinstalled the programs because I have time now to wo

  • How to create a custom kernel with initrd and ARCH patches

    Hi, I like the default kernel because everything seems to work well and I think the Arch kernel includes patches I need (such as the mactel patch). But some options that i would like to be enabled are not. in fact i would like to use powertop but i c

  • PDF Maker producing invisible text

    When I use PDF Maker in Word 2003 SP3 on Windows XP SP3, some of the text in my headers and footers is rendered invisibly. It's still there in the PDF, becasue I can select it in Acrobat 7.0 Professional and even cut it to the clipboard. It's just in

  • ITunes Match Error ALAC Files

    So I've got this really weird issue that I can't quite get my mind around. I've started adding Apple Lossless files to my iTunes library. Honestly, I'm super stoked to be upgrading to lossless as I didn't even know that I could have ALAC files in iTu