Please explain the IMPORT statement?

I have been searching for information on the import statement, but can't seem to locate it. I understand how to use import, but I would like to know, in detail, exactly what it does.
When I import, for example; "java.awt.*", I would expect this statement to import ALL of the classes define under "java.awt". However, I notice in the DiveLog class, that I must also import "java.awt.event.*". This is confusing to me.
Can someone either explain this for me, or point me to the imort documentation?

aye - what yawmark says. And also be aware that import doesn't really "import" any source (not the way #include does, if'n you're an old school C coder). It's just there to shorten typing. You can either type "java.io.IOException" a lot, or import java.io.IOException and get away with just typing "IOException". But you've just "imported" the namespace, not any kind of source.
Make sense?
Lee

Similar Messages

  • Please explain,  the job of the  "ASSIGN COMPONENT ".

    Please read this popular example appended below. I am newbie to ABAP.
    At the end of the execution the code is printing 33. Don't get it.
    Please explain,  the job of the  "ASSIGN COMPONENT ". How or why it is printing value 33.  What is the meaning of the statement, "ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>." ?
    DATA: BEGIN OF LINE,
    COL1 TYPE I VALUE '11',
    COL2 TYPE I VALUE '22',
    COL3 TYPE I VALUE '33',
    END OF LINE.
    DATA COMP(5) VALUE 'COL3'.
    FIELD-SYMBOLS: <F1>, <F2>, <F3>.
    ASSIGN LINE TO <F1>.
    ASSIGN COMP TO <F2>.
    DO 3 TIMES.
    ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F3>.
    WRITE <F3>.
    ENDDO.
    ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>.
    WRITE / <F3>.
    11 22 33
    33

    DATA: BEGIN OF LINE,
    COL1 TYPE I VALUE '11',
    COL2 TYPE I VALUE '22',
    COL3 TYPE I VALUE '33',
    END OF LINE.
    DATA COMP(5) VALUE 'COL3'.
    FIELD-SYMBOLS: <F1>, <F2>, <F3>.
    ASSIGN LINE TO <F1>.
    ASSIGN COMP TO <F2>.      "here you are assigning the column name which is COL3 to <f2>.
    DO 3 TIMES.
    ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F3>.
    WRITE <F3>.
    ENDDO.
    ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>.
    ASSIGN 'COL3' of structure <f1> to <f3>. "it is equal to above statement.
    WRITE / <F3>.
    11 22 33
    33
    ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>. means
    assigining  COL3  value of the structure <f1> to <f3>, so value is 33 , it will be assigned to <f3> .it prints 33.

  • Please explain the magic! (Question)

    The ActionScript snippet below is from the BlaseDS chat sample app. Can someone please explain the magic that declares the chatMessage property of AsyncMessage.body (IMessage.body?) object? It's not in the docs anywhere so I'm guessing it is not built into AsyncMessage. And it's not defined in any of the sample app source files.
    Coming from a strongly-typed development world, seeing a property that apparently has no declaration and is not explicitly instantiated does not pass the sniff-test.
    Thanks.
    <mx:Script>
      <![CDATA[
       import mx.messaging.messages.AsyncMessage;
       import mx.messaging.messages.IMessage;
       private function send():void
        var message:IMessage = new AsyncMessage();
        message.body.chatMessage = msg.text;
        producer.send(message);
        msg.text = "";
       private function messageHandler(message:IMessage):void
        log.text += message.body.chatMessage + "\n";
      ]]>

    Hold your nose, because that is the dynamic "feature" of Actionscript.  Pretty much every class derives from Object (http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Object.html) which is a dictionary of key-value property pairs.  The {"chatMessage", msg.text as Object} pair is created upon assignment.
    I am fairly new to Flex/AS, and while not having to declare types is convenient for quick and dirty coding, I try to avoid it in production code...I have been bitten by refactoring a class and not catching all the places where it was referenced dynamically.  I'm sure there are comprehensive pro and con arguments out there.

  • How to organize the import statements in FXML Files?

    Hello,
    I'm a user of NetBeans IDE and it can organize the import statements in *.java files. Now, I'm using JavaFX and editing the *.fxml files as well. I want to know how to organize the import statements in *.fxml files?
    Thanks a lot.

    You should use Scene Builder, it will make all these import statements for you.
    Moreover, it will greatly simplify the writing of your FXML files, since you only have to Drag&Drop JavaFX objects on the scene. Then, it automatically generates FXML files.

  • Please explain the use of all the below movt types

    Hi friends,
    Can you Please explain the use of all the below movt types and how it is triggered.
    901     GR Area for Production
    902     GR Area External Rcpts
    904     Returns
    910     GI Area General
    911     GI Area for Cost Center
    912     GI Area Customer Order
    913     GI Area - Fixed Assets
    914     GI Area Production Orders
    915     Fixed Bin Picking Area
    916     Shipping Area Deliveries
    917     Quality Assurance
    920     Stock Transfers (Plant)
    921     Stock Transfers (StLoc)
    922     Posting Change Area
    980     R/3 --> R/2 cumulative
    998     Init.entry of stock bal.
    999     Differences
    Regards,
    Balu R.V

    Hi,
    The below mentioned objects are interim storage types, not movement types.
    Interim storage types are used as a sort of bridge between IM and WM.
    MZ

  • 2 GB Limit – Please explain the concept

    I have more than 35000 photos already uploaded into Revel.
    In order to continue to remain a Free member, shall I have to delete all my photos and keep only within 2 GB limit?
    Please explain the new concept... Thanks!

    You may continue to use revel free of charge with the new model change, however, if you have stored more than 2 GB of files, then you will be unable to upload any additional photos/videos until you delete some files to take you below the limit or subscribe to get unlimited uploads.
    Pattie

  • TS1503 In the iPhone, please explain the requirements in settings for Apple id, iPhone and iCloud

    In the iPhone, please explain the requirements in settings for Apple id, iPhone and iCloud

    You can use 1 unified Apple ID for iTunes so you don't have to repurchase apps.   That part is fine.
    For iCLoud/iMessage/Facetime you should each have a unique ID so the 2 phones will be separate and you won't accidentally erase each other's content and overwrite settings, nor will you get the others messaages by mistake.

  • Please explain the following terms in SRM

    Hi Forum,
    I am new to SRM and trying to understand some general terms and concepts in SRM.
    Please explain the meaning of below jargons if possible with an example and what is their use in SRM bussiness scenarios...
    1. Company Code
    2. Account Assignment Category - CC, OR etc
    3. Cost Center
    4. Document Types
    5. Transaction Types
    6. Movement Types
    7. Storage Location
    8. Plants
    9. Central Person
    10. Business Partner
    I am trying to understand what is the relevance of above things in SRM/ECC ?
    Thanks,
    Vivek

    Vivek
    It would be great if you go through http://help.sap.com/saphelp_srm30/helpdata/en/8d/f6a93e08503614e10000000a114084/frameset.htm
    This will help you clear most of your queries.
    Regards,
    Nikhil

  • Could someone please explain the difference between Projects Intelligence and Projects Analytics?

    Could someone please explain the difference between Projects Intelligence and Projects Analytics?
    Thanks,
    Adrien

    Older iPads got 3G service and were called Wi-Fi + 3G. Newer iPads can connect to faster cellular networks and those are given different names by the major carrier so to simplify things Apple calls the newer models Wi-Fi + Cellular.
    iPads with 3G or Cellular are NOT used like a mobile phone. They do not make phone calls or send SMS or MMS text messages, They do connect to the data network and can connect to the web.

  • Can any please explain the integration business process between PS and CS

    Dear Guru's
    Can any please explain the integration business process between Project systems (PS) and customer service (CS).
    Business Process: We do machinery Erection or commissioning, later we do provide service warranty for one year.
    How we map this Business scenario in sap.
    Regards,
    Bhanu

    basic steps for such a process would be
    1) Use PS functionality for your machinery erection or commisioning work. Once the physical work is completed then close porject
    2) Use CS functionality for warranty and service - set up the work as a functional location on customer site (PM/CS functionality)
    3) Use service order to manage any service calls on the object which could require billing via SD module - bill value may be zero if under warranty

  • A consent for a new eula, please explain the ramification of these new terms

    4. Your Compliance With This Agreement.
    You acknowledge that your compliance with the terms of this Agreement may require you to provide certain notices to, obtain certain rights from, and impose certain obligations on your Clients and/or users of the websites hosted by the Services. To that end, you agree that each website for which Adobe provides Services on your behalf (including, if you are a Partner, your Clients’ websites) will contain a clear and conspicuous link to a terms of use and a privacy policy that comply with all applicable laws, rules, and regulations.
    5. Partner Obligations.
    (c) You are responsible for your Clients’ compliance with applicable laws in connection with their use of the Services.
    (g) You have or will obtain all rights necessary for you to grant Adobe the licenses granted in Section 16 (“Content”), below.
    16. Content.
    You (if you are a Site Owner) or your End Users (if you are a Partner), and/or each such party’s respective licensors, retain ownership of any information, content and/or materials that they submit in the course of using the Services (“Content”); however, Adobe needs certain rights to Content in order to provide the Services. Accordingly, you hereby grant to Adobe and its service providers and designees a worldwide, non-exclusive, transferable, sublicensable (through multiple tiers), royalty-free, perpetual, irrevocable right and license, without compensation to you: to use, reproduce, distribute, adapt (including without limitation edit, modify, translate, and reformat), create derivative works of, transmit, publicly display and publicly perform such Content, in any media now known or hereafter developed.
    please explain the ramification of these new terms
    Thank you,
    Lana

    Hi guys,
    Correct as Liam noted there are various topics on these concerns. 
    However if still having issues/concerns I would suggest posting in the original thread below after reviewing Magda's response.
    - http://forums.adobe.com/message/4353638
    Kind regards,
    -Sidney

  • Explain about import statement..

    Hi All,
    what is happening for the below code, pls explain.
      import mdpsx release_9400 block_9400 upd_mro_9400 route_9400 mdvux
          from database indx(zb) id indx_key.
    below is the information
    mdpsx - Internaltable
    release_9400 - Internaltable
    block_9400 - Internaltable
    upd_mro_9400 - Internaltable
    route_9400 - Internaltable
    mdvux - Internaltable
    indx - Database Table
    indx_key is the structure and have the below files in that structure:
    matnr like matvp-matnr
    werks like matvp-werks
    subbu.

    hi
    you wrote..
    >
    subbu ilam wrote:
    > what is happening for the below code, pls explain.
    >
    >
    >   import mdpsx release_9400 block_9400 upd_mro_9400 route_9400 mdvux
    >       from database indx(zb) id indx_key.
    >
    > below is the information
    >
    > mdpsx - Internaltable
    > release_9400 - Internaltable
    > block_9400 - Internaltable
    > upd_mro_9400 - Internaltable
    > route_9400 - Internaltable
    > mdvux - Internaltable
    > indx - Database Table
    >
    > indx_key is the structure and have the below files in that structure:
    >
    > matnr like matvp-matnr
    > werks like matvp-werks
    >
    >
    > subbu.
    NOTE :-IMPORT nad EXPORT is use to importing exporting data to or from the ABAP memory
    import mdpsx release_9400 block_9400 upd_mro_9400 route_9400 mdvux
         from database indx(zb) id indx_key.
    in the above statement mdpsx release_9400 block_9400 upd_mro_9400 route_9400 mdvux is import from the from the ABAP memory database indx(zb)
    hope this helps
    Regards
    Ritesh

  • Please Explain the sequencer ( J2EE Code )

    Hi,
    The following code is a part of Dao, I could understand the flow of the Dao classes but I really could not make out why this sequencer program is used.
    Please explain and send any URL which will help.
    Comments Plz.
    package lrnsource.src.com.lrn.dao.common;
    import java.sql.Connection;
    import java.sql.SQLException;
    * The Sequencer class represents the oracle
    * implementation of Sequencer.
    public interface Sequencer {
         * Gets the next number in sequence for the given entity.
         * @param entity the given entity.
         * @param con the connection object.
         * @return Returns the next number in sequence.
         * @exception throws SQLException when some problem with DB.
         public long getNextSequenceNumber(String entityName, Connection con) throws SQLException;
         * Gets the current number in sequence for the given entity.
         * @param entity the given entity.
         * @param con the connection object.
         * @return Returns the current number in sequence.
         * @exception throws SQLException when some problem with DB.
         public long getCurrentSequenceNumber(String entityName, Connection con) throws SQLException;
    package lrnsource.src.com.lrn.dao.common;
    import com.lrn.common.CommonConstants;
    * This class provides instance of sequencer
    public class SequencerFactory {
         * Public method which gets the runtime implementation class
         * for implementing the sequence generation related functions
         * @Param          seqType the sequencer type.
         * @return Sequencer interface, the type of implementation class.     
         public static Sequencer getSequencer(int seqType){
              Sequencer sequencer = null;
              switch (seqType) {
                   case CommonConstants.ORACLE_SEQUENCER:                    
                        sequencer = new GemsOracleSequencer();                          
              return sequencer;                    
    package lrnsource.src.com.lrn.common;
    * This class contains the constants used across lrn.
    * <p>
    public class CommonConstants {     
         public static final int ORACLE_PERSISTENCE                    = 1;
         public static final int ORACLE_SEQUENCER                    = 1;
         public static final String DATASOURCE_JNDI                    = "java:/comp/env/jdbc/GemsDB";
         public static final String ERROR_MESSAGES                    = "";
         public static final String CERTIFICATION_SERVICE          = "java:/comp/env/ejb/certification";
         public static final String QUESTION_SERVICE                    = "java:/comp/env/ejb/question";
         public static final String REGISTRY_SERVICE                    = "java:/comp/env/ejb/registry";
         public static final String ADMIN_USER                         = "ADMIN";
    }

    dear friend,
    please look here:
    http://help.sap.com/saphelp_47x200/helpdata/EN/c1/416a55de2a11d3b4ff006094b9b9dd/frameset.htm
    regards,

  • About the import statement

    Hi, im trying to use NumberFormat to format a double variable.
    How do i know if i need to use the "import java.someclass" statement or not? thanks for reading.

    NumberFormat is in the java.text package, so you either have to import it via:
    import java.text.NumberFormat;
    or
    import java.text.*;
    or else everywhere you use it fully qualify it as java.text.NumberFormat

  • Please explain the logic.

    select * from
    from cust b
         LEFT OUTER JOIN
         cust a
         ON
         (a.sales_date+1=b.sales_date)
         WHERE TRIM(TO_CHAR(b.sales_date,'DAY')) IN ('SUNDAY','MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY')
         AND b.sales_Date BETWEEN TO_DATE(V_START_DATE,'DD-MON-YY') AND to_date(V_END_DATE,'DD-MON-YY')
         AND a.sales_Date BETWEEN TO_DATE(V_START_DATE,'DD-MON-YY')-1 AND to_date(V_END_DATE,'DD-MON-YY')
    Could someone explain the logic behind the query above?
    Thanks,
    Bhagat

    Bugs wrote:
    select * from
    from cust b
         LEFT OUTER JOIN
         cust a
         ON
         (a.sales_date+1=b.sales_date)
         WHERE TRIM(TO_CHAR(b.sales_date,'DAY')) IN ('SUNDAY','MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY')
         AND b.sales_Date BETWEEN TO_DATE(V_START_DATE,'DD-MON-YY') AND to_date(V_END_DATE,'DD-MON-YY')
         AND a.sales_Date BETWEEN TO_DATE(V_START_DATE,'DD-MON-YY')-1 AND to_date(V_END_DATE,'DD-MON-YY')
    Could someone explain the logic behind the query above?
    Thanks,
    BhagatDoes this query even run? It has syntax error. You have lot of post under your name. So by now you must be knowing the usage of {noformat}{noformat} tag. So please use them to format the code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Issues with using aftermarket 2G chargers with the iphone

    I was using my iphone 3GS last night and battery was over 90% I had just gotten done shooting some video and I was on my PC trying to figure what I needed to do to upload the video to YouTube. I pulled iPhone out of my pocket it was completely dead.

  • Can I use Icloud to upload photographs the same way as in mobile me?

    I just switch from Mobile me to Icloud.  The function I most used in mobile me was creating photo albums and sharing photos with friends and families by sending them an album link from my mobile me gallery. Looking at my page in Icloud and I see "Mai

  • How to change the Schema (DB2, Oracle) in CommandTable at run time

    Dear all, I have a problem as below: I have created report with CommandTable, then I am using Java and CRJ 12 to export data. So how to change the SCHEMA in CommandTable?  Please help me on this. Ex: CommandTable is SELECT * from SCHEMA.TableA, SCHEM

  • How can I extend the face of a box,by picking one of the faces?????

    My requirement is like, I just want to create a wall like structure by using box class. we can create a box with specified dimensions. But i want to extend the dimensions dynamically by clicking on a face of the box. Atleast tell me,whether i can cha

  • Plant grey out when assign material to activity

    Dear All How can system make it gray in plant when i will assign material to activity at created stage of WBS. Is there any config to make it gray in the plant &material under activity ??? I want plant to be editable even after assign material to act