Search:

Type: Posts; User: dhasija

Search: Search took 0.31 seconds.

  1. Threads calling static and non-static method

    One class having two method one as static n another as non-static, 2 threads are there t1 is accessing the static method and t2 the non-static method is it possible n both are sharing the same...
  2. Re: How to test if class/object is immutable

    thanks for correcting me,I have read the article, so here is my questions


    Below I have written the immutable class, Please let me know
    1) Whats wrong in my code
    2) how may i test my immutable...
  3. instance variable are not thread safe i need the code for that

    implementation that proves that instance variables are not thread safe
  4. Re: How to test if class/object is immutable

    This is my code only, i need to know two things
    1) Whats wrong in my code
    2) how may i test my immutable class

    import java.util.*;
    import java.util.Map.Entry;

    public final class...
  5. Re: How to test if class/object is immutable

    That exactly was my question how may I test it if the above class is immutable or not
  6. Re: How to test if class/object is immutable

    immutable object (it cannot be changed once it's created). you mau always correct me if im wrong
  7. How to test if class/object is immutable

    I have make the immutable class as below, Now my question is how I can test if my this class/object is immutable

    package com.learning;

    import java.util.*;
    import java.util.Map.Entry;

    public...
  8. Replies
    2
    Views
    19

    Regarding Java Concurrency

    Hi please any one could suggest some good vedios / books/tutorials for java concurrency. Except for the Java Concurrency in Practice book
  9. Thread: Map.entry

    by dhasija
    Replies
    4
    Views
    12

    Re: Map.entry

    we can duplicate to the arraylist, and to add while iterating we use ListIterator
  10. Thread: Map.entry

    by dhasija
    Replies
    4
    Views
    12

    Re: Map.entry

    Ok thanks Cornix..

    I have one more query whenever i'm adding the element to the list using listIterator, im getting outOfMemorryError
    below is the code snippet I need to know why it should add...
  11. Thread: Map.entry

    by dhasija
    Replies
    4
    Views
    12

    Map.entry

    How I can set key to the newly created Map.Entry as it just have the methos as setValue()
  12. Replies
    2
    Views
    22

    Re: Serializable interface

    However payal inheritance is basically the reference of the base class and object of the subclass. If i will write the object of base class only then it will behave as a simple class.

    Still I...
  13. Replies
    2
    Views
    22

    Serializable interface

    Query-2 : Your base class implements Serializable interface. In a happy go scenario both the base class and subclass objects will get serialized. Now I want that subclass object/properties doesn't...
Results 1 to 13 of 13