Thread: Java Interview Questions please go through this questions and please comment below if you have any doubt.

Forum : Job discussions   19-8-2016 12:00:00 AM
User Image
Ef3522

Newbie

Joined: Apr 20, 2017

Points: 100

Threads: 3

Posts: 7

Java Interview Questions please go through this questions and please comment below if you have any doubt.

| Quote Date : Aug 19, 2016    Views:1828    

1)Immutable Object is thread safe ?

tags: java

Comments

User Image
Ef3522

Newbie

Joined : Apr 20, 2017

Points : 100

Threads: 3

Posts: 7

Re: Java Interview Questions please go through this questions and please comment below if you have any doubt.

Reply Date : Aug 19, 2016

  1. I had attended interviews that i faced as part of my job and trust me guys you will never believe me ,once you enter into company you will be more technologically strongest person in your team.

  2. 1) Immutable Object is thread safe ?
  3. 2) I have two thread one thread need to read data from file and another thread need to write that data in another file ?
  4. 3) By using wait and notify methods need to print even and odd number ?
  5. 4) I have 9 users and i have 3 passwords so here how to share these 3 passwords with those 9 users ?
  6. 5) I have one integer[] ar={10,20,30,40,10,5,46,30}with some elements so how to remove duplicate elements with this array without using collection?
  7. 6) I have 2 Strings like String s1="hello world &&@" and String s2="Hai Ram #@#" so here with these two Strings i want to remove common elements with out using collections?
  8. 7) I have one String like String s="i am a java developer" for this String i want to count how many times each word is repeated without using regular expressions ?
  9. 8) I have one hash Map object with this object i want to display only repeated values means suppose if you have one hash map it contains 1 "a",2 "b", 3 "c" 4 "d" 5 "a", 6 "b", 7 "a" with this hash map i want to display only repeated key and value pair ?
  10. 9) I have one array list object it contains some elements so here i want to display only duplicates please write the logic ?
  11. 10) In my application end user as part of search he is entered String like "amaz#$#%n" so here how you will replace with those special characters with some space (i got this question in one of the top MNC) ? So Thats it guys as part of this weekend i am posting these questions.please make sure consider these questions if you have any queries please comment below i will respond as much as possible.?

User Image
Amritk

Newbie

Joined : May 8, 2017

Points : 220

Threads: 56

Posts: 209

Re: Java Interview Questions please go through this questions and please comment below if you have any doubt.

Reply Date : Sep 8, 2017

Could you please response the answer of below question into your own words with example?

1)Immutable Object is thread safe ??


User Image
Hamid

Newbie

Joined : Jun 25, 2017

Points : 100

Threads: 3

Posts: 24

Re: Java Interview Questions please go through this questions and please comment below if you have any doubt.

Reply Date : Aug 10, 2017

thanks for sharing important question for us

you guys really helping us

tq boss

Replied by bhargav2720
User Image
Aditya3033

Newbie

Joined : Apr 20, 2017

Points : 100

Threads: 3

Posts: 10

Re: Java Interview Questions please go through this questions and please comment below if you have any doubt.

Reply Date : Aug 20, 2016

Thank you so much

Load More

No More Comments