Diffrence between Class.forName() and new Operator

What is diffrence between class.forName() and new operator.Please tell in much detail.
Also about classloader.loadclass.
Suppose the class that we are tring to load with the help of class.forname is not compiled. Again if I make changes at runtime to that class will that get reflected.

What is diffrence between class.forName() and new
operator.Please tell in much detail.Class.forName loads a class. The new operator creates a new instance. Apple trees and apples.
Also about classloader.loadclass.Read the API.
Suppose the class that we are tring to load with the
help of class.forname is not compiled.Then you can't load it and get an exception. Read the API.
Again if I
make changes at runtime to that class will that get
reflected.Depends on the changes and when exactly you do them.

Similar Messages

  • Is there any Similar between Class.forName() and new operator ???

    Plz tel me is there any Similar between Class.forName() and new operator ??? i have been asked this ques in interview

    You probably should have used the other thread:
    http://forum.java.sun.com/thread.jspa?threadID=792678
    To add a little confusion to the matter...Class objects are in fact objects. They're objects representing classes. So, in a sense, I guess, you could say they're similar -- in each you get an object. But in practice Class objects and all other objects should be considered semantically different unless you're doing some pretty unusual stuff. Also Class.forName is more of a factory method than a constructor.

  • Diffrence between a Interface and a abstract class?

    Hi OO ABAP Gurus
    Please clear below point to me.
    Diffrence between a Interface and a abstract class?
    Many thanks
    Sandeep Sharma..

    Hi
    Abstract classes
    Abstract classes are normally used as an incomplete blueprint for concrete (that is, non-abstract) subclasses, for example to define a uniform interface.
    Classes with at least one abstract method are themselves abstract.
    Static methods and constructors cannot be abstract.
    You can specify the class of the instance to be created explicitly: CREATE OBJECT <RefToAbstractClass> TYPE <NonAbstractSubclassName>.
    Abstarct classes themselves can’t be instantiated ( althrough their subclasses can)
    Reference to abstract classes can refer to instance of subclass
    Abstract (instance) methods are difined in the class , but not implemented
    They must be redefined in subclasses
    CLASS LC1 DEFINAITION ABSTARCT
    PUBLIC SECTION
    METHODS ESTIMATE ABSTARCT IMPORTING…
    ENDCLASS.
    Interfaces
    Interfaces only describe the external point of contact of a class (protocols), they do not contain any implementation.
    Interfaces are usually defined by a user. The user describes in the interface which services (technical and semantic) it needs in order to carry out a task.
    The user never actually knows the providers of these services, but communicates with them through the interface.
    In this way the user is protected from actual implementations and can work in the same way with different classes/objects, as long as they provide the services required. This is known as polymorphism with interfaces.
    Interfaces features
    INTERFACE I_COUNTER.
    METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I,           INCREMENT_COUNTER, ENDINTERFACE.
    CLASS C_COUNTER1 DEFINITION.   PUBLIC SECTION.
        INTERFACES I_COUNTER.
      PRIVATE SECTION.
        DATA COUNT TYPE I.
    ENDCLASS.
    CLASS C_COUNTER1 IMPLEMENTATION.
      METHOD I_COUNTER~SET_COUNTER.
        COUNT = SET_VALUE.
      ENDMETHOD.
      METHOD I_COUNTER~INCREMENT_COUNTER.
        ADD 1 TO COUNT.
      ENDMETHOD.
    ENDCLASS.
    Refer
    https://forums.sdn.sap.com/click.jspa?searchID=10535251&messageID=2902116
    Regards
    Kiran

  • What is the diffrence between sap events and application events

    Hi all,
    what is the diffrence between sap events and application events.Can any one tell me with examples.
    regards,

    Hi,
    Look at this,
    <b>System Events (Default)</b>
    The event is passed to the application server, but does not trigger the PAI. If you have registered an event handler method in your ABAP program for the event (using the SET HANDLER statement), this method is executed on the application server.
    Within the event handler method, you can use the static method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code and trigger the PAI event yourself. After the PAI has been processed, the PBO event of the next screen is triggered.
    The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.
    <b>Application Events</b>
    The event is passed to the application server, and triggers the PAI. The function code that you pass contains an internal identifier. You do not have to evaluate this in your ABAP program. Instead, if you want to handle the event, you must include a method call in a PAI dialog module for the static method DISPATCH of the global class CL_GUI_CFW. If you have defined an event handler method in your ABAP program for the event (using the SET HANDLER statement), the DISPATCH method calls it. After the event handler has been processed, control returns to the PAI event after the DISPATCH statement and PAI processing continues.
    The advantage of this is that you can specify yourself the point at which the event is handled, and the contents of the screen fields are transported to the application server beforehand. The disadvantage is that this kind of event handling can lead to conflicts with the automatic input checks on the screen, causing events to be lost.
    Hope u understood.
    Thanks&Regards,
    Ruthra.R

  • What is the diffrence between a javabean and  EJB

    hi!
    what is the diffrence between a javabean and entreprise jvaabeans! i mean which are the uitilization featires of eaxh one !

    i am seeking for a solution for my problem , in fact i ma trying to implement and develop an application with java that allows a certain range of IP adresses to be connected to a database server in order to extract the suitable data from the server .
    let me explain mor ethe suitation , in fact what i am loking for is to use javabeans to grant my application much more consistence and pertinence : si i am asking if it could be possible to use javabeans in my case especially if i am not trying to developp a web application but a cleint /server one allowing some services.
    The application is in fact dealing with a stock exchange market and what i am trying to do is to grant particilar registrated customers to have the informations that they need ( portofolio, currency's status, market indicators, .) also drawing some charts decribing rates, variations, and others specefic financial caracterestics .So , if we consider that this application is not a web application ( no HTTP request and no servers like apache or others ) how it is possible to use javabeans and not EJB to build the application? i mean what could be suitable and preferable to rely on and dvelop to ensure a good java application !!
    if you need more details to help you find the answer for me don't hesitate to answer me back !!
    Someone here gave me that answer
    use RMI to code the services and (Updateable) Value Objects to pass the information between tiers.
    RMI is an all-java distributed component framework (ie. EJB, CORBA, DCE/RPC, DCOM, etc.), that is very suitable for developing non-containerized multi-tier applications. Refer to the RMI trail in the Java Tutorial as a starting point for coding RMI solutions (http://java.sun.com/docs/books/tutorial/index.html). Under this scenario you would code the database access service as an RMI service (server-side). Client/server communication should be facilitated through the use of JavaBeans/classes that wrap the information being passed (customer information, portfolio details, market information, etc.) - these are refered to as 'Updateable Value Objects' (a design pattern). Graphing and charting would be handled in your client from the information received from the (RMI) server. GUI JavaBeans can be used to provide this functionality as well as other client-side services. There are numerous "shrink-wrapped" components for GUIs available on the market just peruse any Java magazine to find them.
    but how comes? how can i do it !! and where can i find more information please about 'Updateable Value Object "
    thanks

  • Diffrence between File Transport and CTS+ Transport in PI

    Hi Guys,
       Can you please explain me the diffrence between File Transport and CTS+ Transport in PI.
       What are the advantages of CTS+ Transportation over FILE Transportation...
    Thanks,
    Siva...

    The file transfer will simply export the objects to a TPZ file, allowing you to import on the target system. This requires manual copying and paste of the object and have no further control.
    CTS+ on the other side, allows the environment to maintain transport requests with control over objects audit. For example, an object must be created on DEV, then after being developed it must go to QA system and will only be sent to PROD when this object was approved by the respective team on QA. For more information on CTS+, please check the help page below.
    http://help.sap.com/saphelp_nwpi71/helpdata/en/9a/775de286874bc78dcb1470bc80f0f9/frameset.htm
    Also the documentation below will provide a more complete overview and configuration steps for the CTS+ usage
    "http://www.sdn.sap.com/irj/scn/go/portal/prtroot/com.sap.km.cm.docs/library/application-lifecycle-management/lifecycle-management/software-logistics/new%20features%20in%20sap%20enhancement%20package%201%20for%20sap%20netweaver%207.0.pdf"
    Please also refer to the SDN thread below
    How to move PI objects in IR and ID from DEV to QAS

  • Diffrence between N85-1 and N85-a

    is there any Hardware/Software Diffrence between N85-1 And N85-a ?

    Hi
    Abstract classes
    Abstract classes are normally used as an incomplete blueprint for concrete (that is, non-abstract) subclasses, for example to define a uniform interface.
    Classes with at least one abstract method are themselves abstract.
    Static methods and constructors cannot be abstract.
    You can specify the class of the instance to be created explicitly: CREATE OBJECT <RefToAbstractClass> TYPE <NonAbstractSubclassName>.
    Abstarct classes themselves can’t be instantiated ( althrough their subclasses can)
    Reference to abstract classes can refer to instance of subclass
    Abstract (instance) methods are difined in the class , but not implemented
    They must be redefined in subclasses
    CLASS LC1 DEFINAITION ABSTARCT
    PUBLIC SECTION
    METHODS ESTIMATE ABSTARCT IMPORTING…
    ENDCLASS.
    Interfaces
    Interfaces only describe the external point of contact of a class (protocols), they do not contain any implementation.
    Interfaces are usually defined by a user. The user describes in the interface which services (technical and semantic) it needs in order to carry out a task.
    The user never actually knows the providers of these services, but communicates with them through the interface.
    In this way the user is protected from actual implementations and can work in the same way with different classes/objects, as long as they provide the services required. This is known as polymorphism with interfaces.
    Interfaces features
    INTERFACE I_COUNTER.
    METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I,           INCREMENT_COUNTER, ENDINTERFACE.
    CLASS C_COUNTER1 DEFINITION.   PUBLIC SECTION.
        INTERFACES I_COUNTER.
      PRIVATE SECTION.
        DATA COUNT TYPE I.
    ENDCLASS.
    CLASS C_COUNTER1 IMPLEMENTATION.
      METHOD I_COUNTER~SET_COUNTER.
        COUNT = SET_VALUE.
      ENDMETHOD.
      METHOD I_COUNTER~INCREMENT_COUNTER.
        ADD 1 TO COUNT.
      ENDMETHOD.
    ENDCLASS.
    Refer
    https://forums.sdn.sap.com/click.jspa?searchID=10535251&messageID=2902116
    Regards
    Kiran

  • Difference between class 200 and 300

    Experts,
    Can i use class 200 for varient configuration?
    I want to know difference between class 200 and 300 , are this same?
    Appriciate help.
    Tom

    Thanks for marking thread useful.
    Class 300 and 200 are both defined for the materials.class 300 is mainly used for a variant material used for variant configurartion.We can also classify materials under class 200 which do not have to be configurable materials.But allows to use the defined characteristics and restrict the usage for a specific purpose..
    Please check below threads
    http://scn.sap.com/thread/631073
    https://scn.sap.com/thread/576848
    Yes you can copy class and create your new class .
    can you please share your business requirement, what kind of solution your are budiling with this?
    Thanks
    Ritesh

  • What is the diffrence between K7T266 Pro and Pro2?

    What is the diffrence between the pro and the pro 2, besides the pro2 being red and having the link lights. Upto what CPU and what type can the pro 1.0 handle? Also, can it be moded to fit a better cpu? Anyone know?
    -Nick

    Pro has the KT266 chipset
    Pro2 has the KT266A chipset
    KT266A has improvements that increase performance, and the Pro2 can be modified to fit Thoroughbred CPUs.
    The Pro (KT266) can only accept up to the Athlon 2000+ palomino.  Also, overclocking the FSB disables USB; this was fixed with the KT266A.

  • What is the diffrence between SAP View and CAD View ?

    What is the diffrence between SAP View and CAD View ?
    What is the main purpose of SAP View
    and
    What is the main purpose of CAD View
    On SAP help i found
    SAP View is used for :The SAP view displays the SAP structure (document-based structure) for the active CAD object, or another document info record (header document), with a single-level or multilevel document structure in a tree structure. You can variably configure the fields using the layout editor.
    CAD View is used for :The CAD view displays the document-based structure of the currently active CAD object, such as the structure of an assembly. The CAD system determines the complete (multilevel) structure and copies it either completely or in stages to the SAP system, in accordance with the default explosion level.
    BUT I did not understand it well
    Can someone explain this with an example
    THanks
    Raj

    Hello Raj,
    SAP View  can be further described as the view that is based on what is existing already in the SAP system. This view is generally used by SAP purchasing, MM people etc
    CAD view is nothing but the replication of the model tree view in the SAP system. This is used by the design engineer and this view replicates only the parts that are actively displayed on the CAD tool window.
    hope this helps. Let me know if you have further questions else please close the message.
    regards
    N K

  • What is the Diffrence between Oracle 11 and 11i

    What is the Diffrence between Oracle 11 and Oracle11i ?.
    With Rgds
    Arun J.Isaac

    Oracle 11i is internet based and run with java platform where we can see the applets downloading alongwith oracle forms and it refreshes all the jar files in oracle default directory.
    Oracle 11 is not intergrated with Java its an Oracle standalone platform.
    Regards,
    Arumugam S.

  • I can't get a thunderbolt connection to work between my iMac and new macbook air

    I would like to establish a connection between my iMac and new macbook air using a thunderbolt connector. Nothing seems to happen when I plug the cable in to each device. When I open Settings/Network it shows up the Thunderbolt bridge as 'Not Connected' on the MacBook and as 'Some Connected' on the iMac. I have no problems with connecting another device (iPad) to the iMac. Can anyone help please?

    Nothing happens when I try to boot up using the command+R keys.
    Did you hold down those keys before booting and continue till you get to a selections window?  You should get this:
    If you can't boot into the Recovery volume make an appointment with the nearest Apple Genius bar for a diagnosis.  You're still under warranty. 

  • Remote Desktop cannot verify the identity of the computer because there is a time or date diffrence between your computer and remote computer

    Hello.....
    I'm not able to log into Windows Server 2008 r2 server thorugh Remote Desktop connection, receiving below error message.
    This issue is with only three servers in the environment
    "Remote Desktop cannot verify the identity of the computer because there is a time or date diffrence between your computer and remote computer......"
    The date/time is correct on the server when i checked in the console session of the server
    Can see below messages in event logs
    Event ID 1014:
    "Name resolution for the name XYZdomain.com timed out after none of the configured DNS servers responded."
    Event ID 1053:
    The processing of Group Policy failed. Windows could not resolve the user name. This could be caused by one of more of the following:
    a) Name Resolution failure on the current domain controller.
    b) Active Directory Replication Latency (an account created on another domain controller has not replicated to the current domain controller).
    Any thoughts ....

    Hi,
    Have you tried to connect these three servers with IP address instead of computer name or DNS name?
    Check Remote Desktop Connection settings: Option-->Advanced-->Connect from anywhere-->Settings-->Connection Settings-->Select “Do not user an RD Gateway server”
    For more information please refer to following MS articles:
    Remote Desktop cannot verify the identity of the remote computer because there is a time or date difference between your computer and the remote computer
    http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/c1f64836-5606-49b0-82eb-56be7f696520
    Cannot connect via Remote Desktop
    http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/5087e897-8313-468c-ad37-ef18b87d4dd6
    Lawrence
    TechNet Community Support

  • I received a car charger for xmas. I have an iPhone 4. Is there a difference in the charging dock between the older and newer iphones? I don't want to damage it by shoving a cable in that is designed for a newer model.

    I received a car charger for xmas. I have an iPhone 4. Is there a difference in the charging dock between the older and newer iphones? I don't want to damage it by shoving a cable in that is designed for a newer model.

    there are 2 connectors the old pin30 and the new ligthing bolt
    they don't look very much alike so if anybody were damage byt forcing it in it would be their own fault seeing how diffrent they are

  • Diffrence between TDS report and actual TDS

    A report required which will show diffrence between TDS report and actual TDS, to get status of tds (liability/receivable) or to compare it.
    so, how to get it in system???
    I want information/ suggestions for standard and Z development both....
    waiting.....
    Regards,
    Sachin

    The below is perfect report for TDS.
    Just copy the below and provide it to your ABAPER and ask him to develop the Z REPORT
    Technical Field     Description          Table Name     Selection screen     Output file
    BUKRS                  Company code          BKPF               Y                            Y
    BELNR                 Accounting doc number     BKPF               Y                            Y
    XBLNR                 Reference (Voucher Number)     BKPF                                 Y
    GJAHR                 Fiscal year          BKPF               Y                            Y
    WITHT                 WHT Type          WITH_ITEM                                 Y
    WT_WITHCD            WHT Code          WITH_ITEM                                 Y
    WT_QSSHH                 WHT base amount in LC     WITH_ITEM                                 Y
    WT_QBSHH                WHT Amount in LC          WITH_ITEM                                 Y
    QSREC                Recipient type          WITH_ITEM                                 Y
    BUDAT                Posting date          BKPF               Y                            Y
    BLDAT                Document date          BKPF               Y                            Y
    PRCTR                Profit Center          BSEG               Y                            Y
    BUPLA                Business Place          BSIS               Y                            Y
    QSATZ                WHT Tax Rate          WITH_ITEM                                 Y
    LIFNR               Account no of the Vendor     J_1IMOVEND         Y                           Y
    J_1IPANNO               PAN Number          J_1IMOVEND          Y
    NAME1                Vendor name          LFA1                                 Y
    QSCOD               Off WHT key          T059Z               Y                           Y
    PSWBT               G/L Amount          BSEG                               Y
    Hope it helps
    Thnks

Maybe you are looking for

  • How to create the condition record by ABAP program

    Hi Friends, I want to create/change the condition record of PR00 by ABAP program. It seems that there have no such BAPI/standard function can help on this. Can any one of you point out a way to me?? Thanks in addvance. Joe GR.

  • 1.5 badly broken, can it be fixed?

    I'm working under the following system: 07:08:00$ uname -a Linux dragon 2.6.4-gentoo #13 SMP Fri Mar 26 01:42:12 EST 2004 x86_64 5 GNU/Linux [linguist@dragon] sl=1 /usr/src/linux 07:13:18$ grep . /proc/cpuinfo /dev/null /proc/cpuinfo:processor : 0 /p

  • Font Conversion Problem

    Hi everyone, I have a problem with MAC fonts. I am using windows operating system and I have soem pdf files prepared in MAC. So if I copy and paste them to anywhere these fonts can not be specify by Windoes. Now I want to convert all the fonts to Tim

  • Need to buy CS5 Design Standard, New Laptop-Help Please

    My wife is a student taking a graphics class a and she must buy CS5 Design Standard (Photoshop, InDesign, Illustrator and Acrobat).  Her computer just broke down and we need to replace it right away but we are on a tight budget.  Can we get by with a

  • I deactivate CS6, and I want to activate it on another computer, but it won't accept my serial number.

    I deactivate CS6, and I want to activate it on another computer, but it won't accept my serial number. How can I fix this?