Aakanksha

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 1,119 total)
  • Author
    Posts
  • in reply to: What is difference between path and classpath variables #15526
    Aakanksha
    Participant

    Answer: PATH is an environment variable used by operating system to locate the executables. A Classpath variable is specific to java and used by java executables to locate class files. Location can be provided to classpath while running java application and it can be a ZIP files, directory, JAR files etc.

    Aakanksha
    Participant

    answer

    void reverselist(void)
    {
    if(head==0)
    return;
    if(head->next==0)
    return;
    if(head->next==tail)
    {
    head->next = 0;
    tail->next = head;
    }
    else
    {
    node* pre = head;
    node* cur = head->next;
    node* curnext = cur->next;
    head->next = 0;
    cur-> next = head;

    for(; curnext!=0; )
    {
    cur->next = pre;
    pre = cur;
    cur = curnext;
    curnext = curnext->next;
    }

    curnext->next = cur;
    }
    }

    in reply to: advantages of inheritance in C plus plus #15429
    Aakanksha
    Participant

    Answer: Advantages of inheritance in C++:

    • It permits code reusability.
    • Reusability saves time in program development.
    • It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.
    in reply to: What is Probability #15407
    Aakanksha
    Participant

    Answer: Probability is a measure of the likeliness that an event will occur. Probability theory is applied in everyday life in risk assessment and in trade on financial markets. Governments apply probabilistic methods in environmental regulation, where it is called pathway analysis.

    in reply to: Define simple and compound interest #15404
    Aakanksha
    Participant

    Answer: If the interest on a sum borrowed for a certain period is reckoned uniformly, then it is called simple interest. Let Principal= ‘P’, Rate=R% per annum, and Time= ’T’ years then
    Simple interest =((P*T*R)/100)
    Compound interest: The formula for calculating compound interest is:
    Amount=P(1+R/100)n
    P= principal amount (the initial amount you borrow or deposit)
    R = annual rate of interest (as a decimal)
    T = number of years the amount is deposited or borrowed for.
    A = amount of money accumulated after n years, including interest.
    n = number of times the interest is compounded per year

    • This reply was modified 9 years ago by Aakanksha.
    in reply to: What are synchronized methods and synchronized statements #15283
    Aakanksha
    Participant

    Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method’s object or class. Synchronized statements are similar to synchronized methods. A synchronized statement can only be executed after a thread has acquired the lock for the object or class referenced in the synchronized statement.

    Aakanksha
    Participant

    The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file.

    in reply to: What is casting #15281
    Aakanksha
    Participant

    There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference.

    in reply to: What advantage do Java layout managers provide #15267
    Aakanksha
    Participant

    Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java’s layout managers aren’t tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.

    in reply to: What is the purpose of finalization #15266
    Aakanksha
    Participant

    The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.

Viewing 10 posts - 1 through 10 (of 1,119 total)