Can anyone knows?

hi please answer this questions, if anyone knows
a) With C++, object reference counts are frequently used to keep track of
how many references to an object exist. Is there a need for such a reference
count for objects with Java? Please explain why or why not.
b) write a small pure Java program that computes the free disk space
of every disk drive available to the Java VM.
c) What is the difference between anonymous and abstract classes? Under what
circumstances would you be using anonymous classes?
Thanks

a) Garbage collector is responsible in java for counting references to objects and to free memory space when object is not referenced any more. Because Java manages memory transparently to programmer it is not neccessary to keep track of references.
b) to be done :)
c) abstarct classes are used to implement some common funcionality for descendand and left some details to be implemented in descendands eg. having class person:
public abstract class Person {
  String firstName;
  String lastName;
  public String getName() {
    return this.firstName + this.lastName
  abstract double calculateSalary();
then you can have two child classes eg. Worker and Manager implementing different logic in calculateSalary(). anonymous class is something like in-place implementation of class. It is used very often for implementing listeners interfaces in GUI application. eg:
  JButton button = new JButton("a button");
   button.addActionListener( new ActionListener() {
       public void actionPerformed(ActionEvent ev) {
          System.out.println("Anonymous class !!!!");
  });or to do something in new thread:
    (new Thread() {
        public void run() {
          //do something in new thread
    }).start();

Similar Messages

  • Can anyone knows how to fix back camera having pink lines when i use it so please help me  thank you

    can anyone knows how to fix back camera having pink lines when i use it so please help me  thank you
    <Email Edited by Host>

    You're welcome.
    The 6.1.4 update had nothing to do with this. If it did, then every iPhone with 6.1.4 installed would have the same problem.
    Apple doesn't support downgrading the firmware, which won't change anything.
    If an Apple Store is miles away, then call AppleCare.

  • How can anyone know on which Xi server one is working ...

    Hi Folks,
    How can anyone know on which Xi server one is working i.e..whether it is DEV/TEST/PROD system....where we can find these tech details???
    Waiting for your responses...
    Cheers...
    Ram.

    hey all..
    i guess, i was unclear wit my question..
    i very well understand the transport of objects frm dev to prod..
    what i wanna knw is...,
    if i hav three diff systtems..i.e prod, dev, n quality..
    wit hittin the tcode: scc4, i get to knw the system id, name n short text..
    n now based on the short text, i identify my system details....(i.e it bein prod or dev)
    but if the short text is missin in the tcode mentioned, then do i hav any other method to knw which system is which Xi System? (prod, dev or qua )...
    regards,
    Ram

  • My ajfon not want to accept Apple ID password. A normally on compiling in the logs. What can anyone know?

    My ajfon not want to accept Apple ID password. A normally on compiling in the logs. What can anyone know? plis

    Meybe that. Mój ajfon nie przyjmuje hasła do Apple ID którym normalnie się loguje na kompie .Co może być .Proszę o pomoc

  • Can anyone knows SM04 related user exits.

    Dear All,
    Can anyone knows SM04 related user exits. Please let me know.
    Urgent.
    Regards,
    Karthik.

    Hi,
       There are no user exits related to SM04.
       U can write a small program to know if a Transaction code has any user
       exits as follows.
    REPORT YTCODE_FIND_USEREXIT .
    *& Report  ZTCODE1                                                     *
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir where pname = tstc-pgmna.
    select single * from enlfdir where funcname =
    tfdir-funcname.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name eq enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    select * from tadir into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct where sprsl eq sy-langu and
    tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    Please award iff it's helpful.
    Regards,
    GSR.

  • Can anyone know this bug....

    Hi all,
    I'm new to the forum and the J2EE. Actually, i'm trying to get some values in a html form and call a jsp.
    The jsp page has to send the values to the bean and the bean should insert the values into a table. Actually everything is fine but the bean inserts null values.
    Can anyone help me in this regard why am i not able to insert the values from the html page.
    thanks,

    Hi!
    here's my code:
    HTML:
    <html>
    <head><title>Data Insertion</title></head>
    <body>
    <form action="insert.jsp" method="post">
    Email:<input type="text" name="ema">
    Password:<input type="text" name="pwd">
    <input type="submit" value="submit">
    </form>
    </body>
    </html>
    BEAN:
    package bean;
    import java.sql.*;
    import java.util.*;
    import javax.servlet.http.*;
    public class InsertBean extends DataConnection{
         static String insertSQL;
         static{
              insertSQL="INSERT INTO emp VALUES (?,?)";
         // Members
         public      String               ema;
         public      String               pwd;
         public InsertBean()
              ema = pwd ="";
         public InsertBean(ResultSet rs) throws SQLException
    ema = rs.getString("ema");
    pwd = rs.getString("pwd");
         public InsertBean(HttpServletRequest rs)
    ema = rs.getParameter("ema");
    pwd = rs.getParameter("pwd");
         public boolean insert(DataConnection conn)
              try
                   PreparedStatement stmt = conn.prepareStatement(insertSQL);
                   stmt.setString(1,ema);
                   stmt.setString(2,pwd);
                   stmt.execute();
                   stmt.close();
              catch(Exception e)
                   e.printStackTrace();
                   return false;
         return true;
    JSP:
    <jsp:useBean id="insbean" class="bean.InsertBean" scope="request" />
    <%
    insbean.insert();
    %>
    Actually, these are the codes that i'm using, and i think that HttpServletRequest object is the one that returns null and so null value is inserted.
    Can you please check the code and intimate me of any other errors.
    Thanks a lot..

  • Can anyone know this?

    Hi all,
    is anyone know this answer? if yes please help me..
    Under which circumstances will
    which Exceptions be caught in the catch block ?
    class Foo
    private Vector objects = new Vector();
    public void compute ()
    Iterator iter = objects.iterator();
    while (iter.hasNext()) {
    try {
    Object o = (Object)iter.next();
    System.out.println(o.hashCode());
    catch (Exception ex) {
    // under which circumstances will which Exceptions
    // be caught here ?
    public void addObject (Object o)
    objects.add(o);

    Under which circumstances will which Exceptions be caught in the catch block ?
    Object o = (Object)iter.next();
    System.out.println(o.hashCode()); I've narrowed your search a bit; if one of these two statements throw an exception, it will be caught
    in your catch block.
    kind regards,
    Jos

  • Flash sites does not work on iphone safari Can anyone know the alternative

    Hi
    My name i zain and i am from pakistan .i have iphone 3gs with 5.1 version .iphone is awesome but one main problem which is arising is that iphone doesnot support flash sites . I am student of ACCA so for my studies i have to take online lectures but when i try to open the video on that flash sites it doesnot work.
    Please its my request tellme how to install flash player as i badly needed it.

    but flash videos doesnot play in full screen mode in puffin .. i am trying to open it in full screen but it's not working .
    opentuition.com is the site . please tell me the method by which i can open the site in full screen mode .

  • I tried to install photomath app from app store.it is free app.but while loading 60INR got deducted from account..can anyone know abt it

    HI ..Not able to download free apps from appstore. Free apps also getting charged. Ex: photomath app is free. But its charging 60 INR

    You are aware that there the app may have downloaded and been placed on the second screen.  Not the main one.  Can you swipe to the right to see if it is there?

  • Use DB Connectivity tool, can I know the database is open by another user without opening it?

    hi all,
    A urgent issue here, is it possible for me to know whether the database is being used by the other user without opening a databse using Databae Connectivity Tool?
    Can anyone know the solution?

    Duplicate post: http://forums.ni.com/ni/board/message?board.id=170&message.id=511732

  • My dv6174cl booting with 3 bips sound (1 long and 2 short), can anyone help me?

    Hi all,
    This laptop bought in the middle of 2007, It doesn't have any problem till today. When I am working then it suddenly not funtion with black screen. I've powered off and on again, it sounds 3 bips, first bip is long and the rest is short. The leg of HDD and DVD and power still light, and when I press ctrl + alt + del it can restart. I also make clean RAM and reseat them, but still same.
    Can anyone know problem, please tell me and give me solution?
    Thanks very much.

    1. you suffer from a faulty nvidia gpu problem.
    http://forum.lenovo.com/t5/T61-and-prior-T-series-ThinkPad/T61p-exhibiting-1-long-and-2-short-beep-a...
    2. 001-803-606-282 (62 21 523 8823)
    021-523-8823 <---- call up these numbers to find out what option you have for warranty extension.
    3. 7664 machine model (which is the you have), have extensive international warranty, it is covered in both indonesia and singapore.
    http://support.lenovo.com/en_US/product-service/iws.page? <--- type in 7664 in the search box, and it will tell you how many different countries your laptop is covered under as part of its integrated international warranty system.
    4. Many thinkpads have international warranty since Thinkpad are aimed at business people, whom may travel abroad quite a lot during the laptop's warranty period, therefore many business laptop like Thinkpad have international warranty. So that in case your laptop fails while you are overseas, you will still be covered for repair as part of the regular warranty services. (Also, the international warranty follows the model number of your machine, and it is set so you can't upgrade to get more coverage).
    Depot warranty versus Onsite Warranty is the one thing that you should contemplate when you are selecting warranty.
    Depot means that you have to send the laptop back to a repair shop (or depot) to get it fixed. While, onsite means the repair technician comes to your home or your work (which ever is more convenient for you) to fix the laptop during 9 am to 5 pm weekday. This usually means that you don't have to be without the laptop for 5 or more days (that is the usual turnaround time for depot repair provided parts are available).
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • When I login I get a message "aosnotifyd wants to use your confidential information stored in "my name" in your keychain." How do I know if it is safe to allow this? Can anyone advise please?

    Every time I login I get the message "aosnotifyd wants to use your confidential information stored in "my name" in your keychain." How do I know if it is safe to allow this? Can anyone advise please?

    My immediate reaction is to deny.
    Have you downloaded or installed any application that may relate to the abbreviation AOS? It may not necessarily be the application's name, could be the developer or distributor.
    As it's occuring at log-in, go to System Preferences > Accounts > your account > Login Items and look for a related item. If there's one there, right-click (or ctrl click) on it and select Reveal in Finder. That will show you where the originator of the item is on your system and should give you more of a clue as to what it is.
    I'd remove the item from login items anyway (highlight and click the minus sign at the bottom of the window). There shouldn't be anything trying to use your keychain info to notify anyone.

  • Does anyone know of an app that is for invoicing that can be accessed from more than one iPad at a time?

    I have a roofing business with my husband and we both have iPads we need a invoicing program app that we both can use and see the same material on both iPads is there any apps that anyone knows of that can do this?

    You'll need a program that can open and edit the invoices. You can search the app store for "invoices" and see what you can find - perhaps there is a cloud-based one that would allow you to store the invoices on their server.
    Or if the apps are fairly simple, you could open them in a Word Processing app that does sync two ways with the cloud and do your work on them - and then store the receipts in Dropbox/iDisk/Sugarsync. Loading the actual documents onto those services is very easy and self-explanatory once you sign up for them.

  • In the latest verision of ITunes (downloaded yesterday) I can no longer see how large (in GB's) my music library or playlists are.  This is a very valuable function and it seems to have disappeared.  Anyone know where it is?

    In the latest verision of ITunes (downloaded yesterday) I can no longer see how large (in GB's) my music library or playlists are.  This is a very valuable function and it seems to have disappeared.  Anyone know where it is?

    Go to the View menu and turn on the Status Bar. If you don't see the menus, go to the small icon with the arrow at the extreme upper left and select "Show Menu Bar":
    Regards.

  • HT201303 An unknown error has occurred when trying to sign in , and I know I putting in the correct info, this stinks can anyone help? Because apple isn't...

    An unknown error has occurred when trying to sign in , and I know I putting in the correct info, this stinks can anyone help? Because apple isn't...

    urgh... just noticed my previous post said i have mountain lion... i meant that i have snow leopard.  no idea why i messed that up!
    anyway, i just tried reinstalling snow leopard from the usb key that came with the computer. Then, I installed software updates until it told me there were no more updates. After that, I tried the app store again, and it still is giving me the unknown error. really irked by that. may have to take it back to the apple store yet again, to see if i can figure out why the app store won't work.

Maybe you are looking for

  • Add a link to a tip

    On this tip, where it says: http://discussions.apple.com/thread.jspa?threadID=1502615&tstart=20 2. Can you get a replacement Mac if you bought just before a new release. Depending on the store you buy from a return/replacement policy may be in place.

  • Office 2013 Hebrew Language pack wont install

    Hi, I installed office 2013 (English) and am trying to install the Hebrew language pack. The first time i did it, the installer started and then crashed. Now when i try to install the language pack it says" this program requires windows 7 or newer ve

  • Change Currency Symbol

    Hi, I have SAR as my default currency symbol, but in Project Center and other places, it is the unit is displayed in Arabic Translation instead of SAR, even if I change the symbol from project professional. Is there a way to change the symbol from Ar

  • EUL import error:  "No joins found where required"

    Has anyone received the following error while importing a Business Area: "No joins found where required"? The import process fails when the error is thrown. The error is thrown after the "Creating and assigning Item Classes...." process. My OracleBI

  • How can i buy headphones of zen touch with rad

    if someone can help it would be great because since i've got my zen touch i never had seen these headphones on creative website.i need it so if somebody wants to sell it or know where i can buy it i will be very interesting