Name.class and Name$1.class

Hi there !
When I compile certain source codes, I've noticed that the result contains two (or more) classes which are named for example Name.class and Name$1.class.
What does that $1 mean ?
Thanks,
- Miika -

The Name$1.class is an anonymous inner class of the Name1 class. Its just a naming convention in java.

Similar Messages

  • DELIVERY Billing class and ORDER Billing class

    Hi,
    I am maintiang an custom table and I Need to add DELIVERY Billing class and ORDER Billing class entries for a list of country.I am not sure where I can find this info in customising or is there any table which hold this info per country wise can you help.
    Regards,
    Amanda

    Hi Shiva ,
    Thank you for your reply,  could you help me like what is the billing class maintained  I need to mintained Billing class in the table .
    Client     ID     Billing class                          Country     Billing type
                                             "D = Delivery Related
                                              O = Order Related"
    Regards,
    Amy

  • Model provider class and data provider class

    please explain Model provider class and data provider class?

    Hi,
    both MPC and DPC get generated as runtime artifacts.
    MPC - This is used to define model. you can use the method Define to create entity, properties etc using code based implementation. you rarely use MPC extension class.
    DPC - used to code your CRUDQ methods as well as function import methods. you write all your logic in redefined methods of DPC extension class.
    Refer Generated ABAP Classes and Service Registration - SAP NetWeaver Gateway - SAP Library for more information.
    you can also refer my blog Let’s code CRUDQ and Function Import operations in OData service! which will provide you clear idea on how to redefine various CRUDQ methods in DPC extension class.
    Regards,
    Chandra

  • Which table stores all development class and names of programs

    Hi All,
    can any one tell me which table stores all development classes and programs we made.

    thanks for the answer , i got info also.
    TADIR is also one table in which you can find out the prog names and dev class.
    check table for dev class is TDEVC.

  • Name 1 and Name 2 fields of Business Partner - changes get set back

    Dear Experts,
    in SRM 7.0 CS, i am facing the following problem w.r.t Messages in the shopping cart.
    It is known system behaviour, that in case the contend of the fields Name 1 or Name 2 of the Plant Business Partner is longer than 35 digits, than a (warning) message is displayed in the shopping cart with the content like "Name 2 field, limited amount of digts can be displayed..."
    I have shortened the content of the field Name 2 of the BP of my plant, but it seems that after some time the old contend has been written back into the field for some reason.
    Has anyone experienced a similar problem? What could be the cause? Is it recomandable to use the "Influence Message Control" configuration for this message, in order to hide it completely?...or should the "Message Control By User" configuration be used?
    Thank you very much in advance for your support.

    Dear All,
    i seem to have been able to solve the problem by not only making the change on the BP, but also respectively changing the content in the respective fields in PPOMA (reduce the length of the content in the fields Name1 and Name2 of the location).
    Thank you.

  • Difference between abstract class and the normal class

    Hi...........
    can anyone tell me use of abstract class instead of normal class
    The main doubt for me is...
    1.why we are defining the abstract method in a abstract class and then implementing that in to the normal class.instead of that we can straight way create and implement the method in normal class right...../

    Class vs. interface
    Some say you should define all classes in terms of interfaces, but I think recommendation seems a bit extreme. I use interfaces when I see that something in my design will change frequently.
    For example, the Strategy pattern lets you swap new algorithms and processes into your program without altering the objects that use them. A media player might know how to play CDs, MP3s, and wav files. Of course, you don't want to hardcode those playback algorithms into the player; that will make it difficult to add a new format like AVI. Furthermore, your code will be littered with useless case statements. And to add insult to injury, you will need to update those case statements each time you add a new algorithm. All in all, this is not a very object-oriented way to program.
    With the Strategy pattern, you can simply encapsulate the algorithm behind an object. If you do that, you can provide new media plug-ins at any time. Let's call the plug-in class MediaStrategy. That object would have one method: playStream(Stream s). So to add a new algorithm, we simply extend our algorithm class. Now, when the program encounters the new media type, it simply delegates the playing of the stream to our media strategy. Of course, you'll need some plumbing to properly instantiate the algorithm strategies you will need.
    This is an excellent place to use an interface. We've used the Strategy pattern, which clearly indicates a place in the design that will change. Thus, you should define the strategy as an interface. You should generally favor interfaces over inheritance when you want an object to have a certain type; in this case, MediaStrategy. Relying on inheritance for type identity is dangerous; it locks you into a particular inheritance hierarchy. Java doesn't allow multiple inheritance, so you can't extend something that gives you a useful implementation or more type identity.
    Interface vs. abstract class
    Choosing interfaces and abstract classes is not an either/or proposition. If you need to change your design, make it an interface. However, you may have abstract classes that provide some default behavior. Abstract classes are excellent candidates inside of application frameworks.
    Abstract classes let you define some behaviors; they force your subclasses to provide others. For example, if you have an application framework, an abstract class may provide default services such as event and message handling. Those services allow your application to plug in to your application framework. However, there is some application-specific functionality that only your application can perform. Such functionality might include startup and shutdown tasks, which are often application-dependent. So instead of trying to define that behavior itself, the abstract base class can declare abstract shutdown and startup methods. The base class knows that it needs those methods, but an abstract class lets your class admit that it doesn't know how to perform those actions; it only knows that it must initiate the actions. When it is time to start up, the abstract class can call the startup method. When the base class calls this method, Java calls the method defined by the child class.

  • Document Classes and other Questions

    Basically, i am working on an application that will eventually be deployed to the desktop as an AIR application.
    I am wanting to create an Analogue clock and Digital clock with a button that toggles the display between either one when pressed. As well as this, i will be wanting to display the Date below, i am having a number of issues however.
    I have the code sorted for three of the four components, i have not attempted to figure out the button thus far as i would be more than happy to have the digital clock, analogue clock and date all being displayed on a drag and drop desktop application first. When i say i have it sorted, i have a fully working analogue clock which i have managed to display on the desktop through air on its lonesome, however, i did not include the drag and drop function. For the digital clock and date components i am not sure how to configure them into document classes. The main issue i am having is i do not know if you can reference a dynamic text box within a movie clip to a document class.
    This is the code to show the date
    [code]{
    var currentTime:Date = new Date();
    var month:Array = new Array("January","February","March","April","May","June","July","August","September","Octo ber","November","December");
    var dayOfWeek:Array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
    date_text.text = dayOfWeek[currentTime.getDay()] + " " + currentTime.getDate() + " " + month[currentTime.getMonth()] + " " + currentTime.getFullYear();
    [/code]
    I have put the actionscript frame inside the movie clip file, and i have given both the movie clip, and the dynamic text box within the movie clip the instance name "date_text".
    Basically, i am just struggling in how to put this code into a working document class, since the digital clock and date functions are both, some what similar, i feel the solution to one will more than likely lead to me discovering the solution for the other.
    The other problem i am having, i do not know how i will display all of the components on one air application. I am assuming, that you create one other document class file which links the other four together? i have tried to do this by just linking a new FLA file with the analogue clock, but it does not work. The code for that is below.
    [code]package
              import flash.events.Event;
              import flash.display.MovieClip;
              public class time1 extends MovieClip
                        public var now:Date;
                        public function time1()
                                  // Update screen every frame
                                  addEventListener(Event.ENTER_FRAME,enterFrameHandler);
                        // Event Handling:
                        function enterFrameHandler(event:Event):void
                                  now = new Date();
                                  // Rotate clock hands
                                  hourHand_mc.rotation = now.getHours()*30+(now.getMinutes()/2);
                                  minuteHand_mc.rotation = now.getMinutes()*6+(now.getSeconds()/10);
                                  secondHand_mc.rotation = now.getSeconds()*6;
    [/code]
    That is the original clock document class (3 Movie clips for the moving hands, and the clock face is a graphic, which i may have to reference somehow below)?
    [code]package
              import flash.display.MovieClip;
              public class main extends MovieClip
                        public var hourHand_mc:time1;
                        public var minuteHand_mc:time1;
                        public var secondHand_mc:time1;
                        public function main()
                                  hourHand_mc = new SecondHand();
                                  addChild(mySecondHand);
                                  hourHand_mc.x = 75;
                                  hourHand_mc.y = 75;
                                  minuteHand_mc = new SecondHand();
                                  addChild(mySecondHand);
                                  minuteHand_mc.x = 75;
                                  minuteHand_mc.y = 75;
                                  secondHand_mc = new SecondHand();
                                  addChild(mySecondHand);
                                  secondHand.x = 75;
                                  secondHand.y = 75;
    }[/code]
    This is my attempt at creating the main document class in a seperate FLA file to attempt to load the analogue clock, and later on the Digital Clock, Date Function and Toggle Display button in the same AIR application.
    Any help on this is much appreciated, i have been reading up a lot on it through tutorials and the like, but i can't seem to fully grasp it.

    why do you have code in a movieclip?
    if you want to follow best practice and use a document class you should remove almost all code from timelines.  the only timeline code that might be reasonably used would be a stop() on the first frame of multiframe movieclips.
    so, you should have a document class.  that could contain all your code but it would be better to just have your document class create your 2 clocks and date objects and possibly manage toggling between the two clocks.  you could have a separate class the tracks the time and date and that class is used by your two clock classes and your date class.

  • Difference b/w Java Class and Bean class

    hi,
    can anybody please tell me the clear difference between ordinary java class and java Bean class. i know that bean is also a java class but i donno the exact difference between the both.
    can anybody please do help me in understanding the concept behind the bean class.
    Thank u in advance.
    Regards,
    Fazlina

    While researching this question, I came across this answer by Kim Fowler. I think it explains it better than any other answer I have seen in the forum.
    Many thanks Kim
    Hi
    Luckily in the java world the definition of components is a little
    less severe than when using COM (I also have, and still occasionaly
    do, worked in the COM world)
    Firstly there are two definitions that need to be clarified and
    separated: JavaBean and EnterpriseJavaBean (EJB)
    EJB are the high end, enterprise level, support for distributed
    component architectures. They are roughly equivalent to the use of MTS
    components in the COM/ COM+ world. They can only run within an EJB
    server and provide support, via the server, for functionality such as
    object pooling, scalability, security, transactions etc. In order to
    hook into this ability EJB have sets of interfaces that they are
    required to support
    JavaBeans are standard Java Classes that follow a set of rules:
    a) Hava a public, no argument constructor
    b) follow a naming patterns such that all accessor and modifier
    functions begin with set/ get or is, e.g.
    public void setAge( int x)
    public int getAge()
    The system can then use a mechanism known as 'reflection/
    introspection' to determine the properties of a JavaBean, literally
    interacting with the class file to find its method and constructor
    signatures, in the example above the JavaBean would end with a single
    property named 'age' and of type 'int' The system simply drops the
    'set' 'get' or 'is' prefix, switches the first letter to lower case
    and deduces the property type via the method definition.
    Event support is handled in a similar manner, the system looks for
    methods similar to
    addFredListener(...)
    addXXXListener
    means the JavaBean supports Fred and XXX events, this information is
    particularly useful for Visual builder tools
    In addition there is the abiliity to define a "BeanInfo' class that
    explicitly defines the above information giving the capability to hide
    methods, change names etc. this can also be used in the case where you
    cannot, for one reason or another, use the naming patterns.
    Finally the JavaBean can optionally - though usually does - support
    the Serializable interface to allow persistence of state.
    As well as standard application programming, JavaBeans are regularly
    used in the interaction between Servlets and JSP giving the java
    developer the ability to ceate ojbect using standard java whilst the
    JSP developer can potentially use JSP markup tags to interact in a
    more property based mechanism. EJB are heaviliy used in Enterprise
    application to allow the robust distribution of process
    HTH.
    Kim

  • Classes and methods and Nodes

    hey guys. I have a class called Player, a class called Node, and a class called TurnTaker. The TurnTaker class uses both the Node class and the player class. All the files are in the same directory but i am getting an unresolved symbol for the methods (getName() and printString())
    here is my turnTaker Class
    class Turntaker
         private int totTurns=0;
         private Node first = null;
         private Node turn = first;
         private Node last;
         private Node walk = first;
         public void takeTurn()
              totTurns ++;
              System.out.println(totTurns + ". " + turn + " is taking a turn.");
              turn = turn.getNext();     
         public void addPlayer(Player name)
              Node w = new Node(name, null);
              if(first == null)
                   first = w;
                   last = w;
              else
                   last.setNext(w);
                   last = last.getNext();
                   w.setNext(first);
         public void deletePlayer(Player name)
              while((walk.getItem().getName()).equals(name)!=true)
                   walk = walk.getNext();
              if(turn == walk)
                   turn.getNext();
              walk.setNext(walk.getNext());     
         public void printPlayers()
              walk = first;
              (walk.getItem()).printstring();
              walk = walk.getNext();
              while(walk!=first)
                   (walk.getItem()).printString();
    }here is my Player class
    public class Player
         private String name;
         private int numTurn;
         public Player(String theName)
              name = theName;
              numTurn = 0;
         public int getNumTurn()
              return numTurn;
         public String getName()
              return name;
         public void setNumTurn(int turn)
              numTurn = turn;
         public void printString()
              System.out.println(name + " has taken " + numTurn + " turns.");
    }and here is my Node Class
    public class Node
         Object item;
         Node next;
         public Node(Object newItem, Node nextNode)
              item = newItem;
              next = nextNode;
         public void setItem(Object newItem)
              item = newItem;
         public Object getItem()
              return item;
         public void setNext(Node nextNode)
              next = nextNode;
         public Node getNext()
              return next;
    }can anyone please tell what is wrong with my code?
    thank you

    awesome..my class compiles. ok now i just got a little bit left. I also have a driver program that i made to test out everything. I am getting 12 errors, all pointing to the points where i try to use the methods from my TurnTaker Class. The error is an unresolved symbol error.
    here is my driver
    class TurnTakerDriver
         public static void main(String[] args)
              Player p1 = new Player("Jim");
              addPlayer(p1);
              Player p2 = new Player("Sue");
              addPlayer(p2);
              Player p3 = new Player("Abe");
              addPlayer(p3);
              printPlayers();
              for(int i=0; i<5; i++)
                   takeTurn();
              Player p4 = new Player("Lynn");
              addPlayer(p4);
              printPlayers();
              for(int i=0; i<3; i++)
                   takeTurn();
              deletePlayer(p4);
              printPlayers();
              for(int i=0; i<2; i++)
                   takeTurn();
              printPlayers();
    }any ideas?

  • Putting code to my Jsf and Jsff pages and calling Java class

    I want guidance on how to write simple code on adf pages
    1. I have adf pages (.jsf and .jsff) where I have input text fields and command buttons, I want to put custom code on the command button such that when you click on any of the buttons at runtime, the code will be executed.
    2. In my application, I have a java class which I have written, I need to click on any of the buttons at runtime, the application will call the java class and execute the class. Essentially, taking parameters from my adf page(s) (.jsf and .jsff) to the java class and also returning parameters after execution.

    The version of my Jdev. is 11.1.2.3.0
    Which docs?.... I will be grateful if you can point to the particular doc fro me.
    1) Can you pls tell me in one of few sentences how to add method and set the actionListener property.
    2) in question number 2, I am totally lost... Let me explain my self again to clarify the situation. In my adf page, I have a button and three input texts,my purpose is that at runtime, when a user click on the button, the values in the first two input texts will be passed to the java class as parameters, it is expected to use these parameters to process some form of calculations and return a value which I will place on the  third input field.

  • List display for ALV using class and methods

    Hi friends
    I want the list display for the ALV using Class and methods
    which class and methods i can use.
    Here we can't use the REUSE_ALV_LIST_DISPLAY and also GRID
    I was done GRID display using class and methods but i want only list display for using class.
    plz Give me sample code of list display not for grid.
    Thanks
    Nani.

    hi
    please check with this code...
    declare grid and container.
    DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid,
    o_dockingcontainer TYPE REF TO cl_gui_docking_container,
    i_fieldcat TYPE lvc_t_fcat,"fieldcatalogue
    w_layout TYPE lvc_s_layo."layout
    If any events like double click,etc., are needed we have to add additional functionality.
    call the screen in program.
    Then , create the container as follows
    IF cl_gui_alv_grid=>offline( ) IS INITIAL.
    CREATE OBJECT o_dockingcontainer
    EXPORTING
    ratio = '95'
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    others = 6.
    ENDIF.
    CREATE OBJECT o_alvgrid
    EXPORTING
    i_parent = o_dockingcontainer.
    Build the fieldcatalog
    create a output structure in SEll for the ALV output
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = <alv output>
    CHANGING
    ct_fieldcat = i_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE i030."Error in building the field catalogue
    LEAVE LIST-PROCESSING.
    ENDIF.
    *If you need to modify the field catalog,modify it using field sysmbols
    *setting the layout
    w_layout-grid_title = title.
    w_layout-zebra = 'X'.
    then displaying the output
    CALL METHOD o_alvgrid->set_table_for_first_display
    EXPORTING
    i_save = 'A'
    is_layout = w_layout
    CHANGING
    it_outtab = i_output[]
    it_fieldcatalog = i_fieldcat[]
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4.
    IF sy-subrc <> 0.
    MESSAGE i032 ."Error in Displaying
    LEAVE LIST-PROCESSING.
    ENDIF.
    *After that in PAI of the screen, you need to free the *object while going back from the screen(according to *your requirement)
    MODULE user_command_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'EXIT' OR 'CANC'.
    PERFORM f9600_free_objects:
    USING o_alvgrid 'ALV' text-e02,
    USING o_dockingcontainer 'DOCKING'
    text-e01.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_9001 INPUT
    *in the program, write the follwoing code
    FORM f9600_free_objects USING pobject
    value(ptype)
    value(ptext).
    DATA: l_objectalv TYPE REF TO cl_gui_alv_grid.
    CASE ptype.
    WHEN 'ALV'.
    l_objectalv = pobject.
    IF NOT ( l_objectalv IS INITIAL ).
    CALL METHOD l_objectalv->free
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3.
    CLEAR: pobject, l_objectalv.
    PERFORM f9700_error_handle USING ptext.
    ENDIF.
    WHEN 'DOCKING'.
    DATA: lobjectdock TYPE REF TO cl_gui_docking_container.
    lobjectdock = pobject.
    IF NOT ( lobjectdock IS INITIAL ).
    CALL METHOD lobjectdock->free
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3.
    CLEAR: pobject, lobjectdock.
    PERFORM f9700_error_handle USING ptext.
    ENDIF.
    WHEN 'CONTAINER'.
    DATA: lobjectcontainer TYPE REF TO cl_gui_container.
    lobjectcontainer = pobject.
    IF NOT ( lobjectcontainer IS INITIAL ).
    CALL METHOD lobjectcontainer->free
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3.
    CLEAR: pobject, lobjectcontainer.
    PERFORM f9700_error_handle USING ptext.
    ENDIF.
    WHEN OTHERS.
    sy-subrc = 1.
    PERFORM f9700_error_handle USING
    text-e04.
    ENDCASE.
    ENDFORM. " f9600_free_objects
    FORM f9700_error_handle USING value(ptext).
    IF sy-subrc NE 0.
    CALL FUNCTION 'POPUP_TO_INFORM'
    EXPORTING
    titel = text-e03
    txt2 = sy-subrc
    txt1 = ptext.
    ENDIF.
    endform.
    also check with this
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    Hope this helps
    if it helped, you can acknowledge the same by rewarding
    regards
    dinesh

  • WAAS and NAM 4.2 Reporting

    hey folks,
    I recently went through the upgrade process with a customer to move their NAMs to 4.2 and integrate WAAS 4.0.15 with the NAMs via the flow agent. We followed the NAM integration guide and setup some reporting in the NAM for collecting information from the WAAS flow agents on bandwidth and response time. However, at this point, the information that we seem to be getting is limited. I am finding the reports in the WAAS GUI itself to be more valuable at this time, however, I have heard from several engineers since this integration has been available that NAM and WAAS are a good fit. Does anyone have any specific reports that they can point me towards in the NAM? Right now I have setup some Application optimization specific reports in the WAAS CM for HTTP and CIFS. What I would like to do is use the NAM to validate those reports and provide some upper management level visibility into specific flows to specific servers and how effective WAAS has been in optimizing that traffic. This customer is about to deploy WAAS worldwide and having some more detailed reporting capability would be very helpful.
    Does anyone on the list have any good experience with NAM 4.2 and WAAS that they can share and some how to's on what reports they are finding the most valuable to their senior managers and IT staff? Thanks
    Sincerely
    Mike Louis

    Hi Mike,
    This webinar on Jan 12; might be of interest to you.
    You can register via this URL.
         https://ciscosales.webex.com/ciscosales/onstage/g.php?d=201229605&t=a
    I also attached a document that might help as well - Using NAM Hardware in a WAAS POC and Depoloyment.
    Thanks
    Eric - please mark as answered with a rating of 5, if this answered your questions.
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman","serif";}
    Leverage Cisco Network Analysis   Module to enhance operational visibility into WAAS deployments. NAM   reports on a comprehensive set of application performance metrics such as   application response time, WAN bandwidth usage, LAN and WAN data throughput,   and other application performance metrics to:
    Identify        application optimization opportunities
    Analyze        impact of Cisco WAAS implementation
    §  Take advantage of visibility for ongoing    optimization improvements and troubleshooting
    Cisco NAM   4.1 also introduces the first software only version of the NAM as a Virtual   Blade on the WAVE 574 and WAE 674.
    If you have ever felt overwhelmed   trying to answer the following questions:
    ·         How do I verify the impact of WAAS on   application performance at my remote offices?
    ·         How do I get the level of visibility needed   for effective operational manageability?
    ·         Is there a monitoring solution that is   integrated and does not demand additional footprint?
    ·         Is there a solution that provides visibility   across the entire WAAS deployment lifecycle?
    Please join us for a webinar of   the Cisco NAM 4.1 that explores the performance management and   troubleshooting capabilities of NAM hardware and NAM VB in a WAAS environment   to help address the above questions and more.
    WEBINAR Dates and Times:
    REGISTER January 12th, 2010 Tuesday at 8:00 - 9:00 AM PST/11:00-12:00 EST
    Agenda:
    ·         Overview of NAM and NAM VB
    ·         Setting up  NAM for WAAS analysis
    ·         Use of NAM for WAAS before-and-after impact   analysis
    ·         Use of NAM to improve manageability and   troubleshooting of WAAS
    ·         Q&A
    NOTE – Once you have   registered for the webinar, you will get a WebEx message with outlook ics   file.
    Please   click on the .ics file when you get your message from WebEx to make sure it   is placed on your Outlook Calendar.
    © 2010 Cisco Systems, Inc. All rights   reserved. Privacy Statement and Trademarks of Cisco Systems, Inc

  • Difference between ArrayList class and LinkedList class

    I would like to ask what is the difference between the ArrayList class and the LinkedList class? If I use ArrayList class can I have a fixed size?
    Thank you for your answers.

    I often use LinkedList when I need a FIFO. When all you're doing is adding to the end of a list and removing the first element, it is definitely faster. Here's a quick SSCCE I wrote up to demonstrate:import java.util.*;
    public class ListTest {
       public static void main(String[] args) {
          LinkedList<Integer> linked = new LinkedList<Integer>();
          ArrayList<Integer> array = new ArrayList<Integer>();
          Integer[] values = new Integer[2500000];
          for (int i = 0; i < values.length; i++) {
             values[i] = new Integer(i);
          Random rand = new Random();
          boolean[] randDir = new boolean[values.length];
          for (int i = 0; i < randDir.length; i++) {
             randDir[i] = rand.nextBoolean();
          long startTime, endTime;
          startTime = System.currentTimeMillis();
          for (int i = 0; i < values.length; i++) {
             if (linked.size() > 0 && randDir) {
    linked.removeFirst();
    else {
    linked.addLast(values[i]);
    endTime = System.currentTimeMillis();
    linked.clear();
    System.out.println("linked:"+(endTime-startTime));
    startTime = System.currentTimeMillis();
    for (int i = 0; i < values.length; i++) {
    if (array.size() > 0 && randDir[i]) {
    array.remove(0);
    else {
    array.add(values[i]);
    endTime = System.currentTimeMillis();
    System.out.println("array:"+(endTime-startTime));
    array.clear();

  • Difference between a java program and a java class

    Hi there,
    What is the difference between a java program and a java class?

    HI,
    A java class is an object - described in a .class file - which has been given properties and behaviours and which can be instantiated in a program.
    A java program( application ) consists of at least one class (one of which must be declared public) and which executes its main() method ( of the public class ) when it is started.
    Every program is a class but not every class is a program.
    Examples:
    A java program
    // this simple program will print out the first command line argument you put
    // in after calling : java ScreenWriter "arguments"
    class ScreenWriter
    public static void main( String [] args )
    if( args.length > 0 )
    System.out.println( args[0] );
    A java class
    //the Math class is already defined in the java.lang package
    //and contains a constant for PI
    //So I can include the Math class with the PI constant in my simple program
    //and now I have a program that involves my ScreenWriter class and the Math class too.
    class ScreenWriter
    public static void main( String [] args )
    if( args.length > 0 )
    System.out.println( args[0] );
    System.out.println( "The value of Pi is: " + Math.PI );
    When you see package and import declarations at the start of a program they are there to ensure the compiler knows which classes are used in the program.
    Hope that helps,
    Terry

  • XD01 fields Name 3 and Name4 not visible

    Hi,
    I have a requirement, in xd01, when i go to Address tab, by default sap shows only Name1 and Name2 fields, but Name3 and Name4 are visible only after clicking on the "More Fields" button, which will expand and Name3 and Name4 fields will then be shown.
    My requirement is to keep these fields open all time.
    Kindly let me know the solution.
    Thanks,
    A Sustainer

    Hi
    if you want name3 and name4 mandatory fields in XD01 means
    Path:
    Financial Accounting (New) --Accounts Receivable and Accounts Payable--Customer Accounts--     Master Data-- Preparations for Creating Customer Master Data --Define Account Groups with Screen Layout (Customers) --
    select that particular group and click GENERALDAT : -- ADDRESS  - put required entry for Name 3 and Name 4
    thanking you
    regards
    Mahesh

Maybe you are looking for

  • Forming a report query dynamically with the value of an item

    Hi Gurus, We wanted to create a report based on the value of an item in the page. For example There is a text box named p1_table depending on the value of this item the query of the report should change 1) when p1_table = emp then report query should

  • How to send Internal table records to Idoc Inbound posting FM to create Ido

    Hello Experts, I have all the data necessary to create shipments in one internal table inside my ABAP program. I can use BAPI_SHIPMENT_CREATE to create shipments. But associated with this BAPi there is one ALE message type SHIPMENT_CREATEFROMDATA. No

  • How to implement container with dividers between elements?

    What is the correct way to implement custom container with dividers between element in Flex 4 Spark architecture? In Flex 3 I would add dividers in rawChildren array and in updateDisplayList function I would arrange position of dividers and children.

  • Java dosnt work on my mac ?

    please can someone help me, i've downloaded java on my macbook, and everytime im trying to visit a site i cant !!! ehats seems the problem here ??

  • Code de security

    hi it's allan l m from drc (congo) and i need yr help please. l hav nokia C1  01 and l forgot the security password l dnt knw hw can resolve this problem. please show me the mans can i do? thnxs   MODERATOR'S NOTE: We have edited your post as it cont