• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Help A Student With Some Interview Questions?

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

I've some interview question. Please send answer if anybody knows this.

1. what is servlet context and what it takes actually
as parameters? (other than from .xml file)

2. can we call destroy() method on servlets from
service method?

3. is there any difficulty of using the vector class
within a servlet class

4. what are the parsers and how can you use them in
your application?

5. is there any other immutable object other than
string?

6. how you are implementing multithreading concept in
fourth driver?

7. what are the advantages of doget() method?

8. when the servlet is going to initialize first time?

9 how to avoid deadlock situation?(other than singleton)

10. how to identify and remove the duplicate values in
an array?

11. if a system exposes bussiness API's to a client -
then what pattern it is using?
a) data access object.
b) value object.
c) business delegate.

12. What is threadsafe,class variable, instance variables? What is the difference in that

Thanks in Advance

[ May 25, 2005: Message edited by: Gregg Bolinger ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, what are your answers?
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

1. what is servlet context and what it takes actually
as parameters? (other than from .xml file)

Ans: Servlet container takes care of it. I don't know how it is created. pls. let me know if u get any ans to this question.

2. can we call destroy() method on servlets from
service method?


Ans: yes. it is like any otehr method. But it will not deregister the servlet. if you have any code which do some cleanup then it will lead the servlet to unstable state.

3. is there any difficulty of using the vector class
within a servlet class

Ans: No, but if you are using it as instance variable it will degrade the performace as vector is thread safe.


4. what are the parsers and how can you use them in
your application?
Ans: XML -> sax, pull, dom

java parser: Antlr, YMCC

5. is there any other immutable object other than
string?

Ans: don't know, let me know if there is any.

6. how you are implementing multithreading concept in
fourth driver?

Ans: which 4rth driver is not multithreaded?

7. what are the advantages of doget() method?

Ans: can be invoked directly by passing query string. Is useful for invoking resource through hyper link

8. when the servlet is going to initialize first time?

Ans: At startup and only once

9 how to avoid deadlock situation?(other than singleton)

Ans: singleton is not for avoiding deadloc.

10. how to identify and remove the duplicate values in
an array?

Ans: iterate through entire list and compare each one with other to find duplicate. use 2 for loop for this.


11. if a system exposes bussiness API's to a client -
then what pattern it is using?
a) data access object.
b) value object.
c) business delegate.

Ans : c) business delegate.

12. What is threadsafe,class variable, instance variables? What is the difference in that
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

5. is there any other immutable object other than
string?



I believe , all the wrapper classes Interger,Double,etc.. are immutable.

Thanks
Akilan
 
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't believe people have actually posted answers to this post.

First the apparent lack of work done by the poster, and second do you really want this guy to get a job where this knowledge is required? Maybe he'll get put on a project with you then you can continue to do his work for him.

Note, this is for an interview! It's people like this that give IT a bad name and make it harder for really qualified people to get work.
 
Ranch Hand
Posts: 472
Objective C Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree, the interview questions look like a person who created them had no idea about interviwing process and what (s)he is looking for.

1. what is servlet context and what it takes actually
as parameters? (other than from .xml file)

I have no idea what's relation servlet context with .xml and why knowledge of that so important.

2. can we call destroy() method on servlets from
service method?

Again pointless question. Maybe it pretendent to be tricky one? Who knows.

3. is there any difficulty of using the vector class
within a servlet class

Hmm. Probably author of this question has?

4. what are the parsers and how can you use them in
your application?

It's difficult to say what an author of this question meant. I'd answer as a parser for parsing streamable data, for example StringTokenizer.


5. is there any other immutable object other than
string?

It's funny. Some interviewer asked me, is String really immutable? When I answered yes, he had happiest face I ever seen, becasue he read java.programmer news group and found a trick allowing to change String content without a creation new object. Based on that I'd answer, yes, just pick any.

6. how you are implementing multithreading concept in
fourth driver?

I do not implement any fourth drivers.

7. what are the advantages of doget() method?
No advantages against any other methods. I believe an authour thought about advantages of implementation put method of http protocol.

8. when the servlet is going to initialize first time?
Probably the best question in the list.

9 how to avoid deadlock situation?(other than singleton)
No comments. An authr has no idea (s)he's asking.

10. how to identify and remove the duplicate values in
an array?

I'd say do not allow them to be there.

11. if a system exposes bussiness API's to a client -
then what pattern it is using?
a) data access object.
b) value object.
c) business delegate.

The question supposes to check knowledge of design patterns, but does it really do that?

12. What is threadsafe,class variable, instance variables? What is the difference in that
What's right answer? Atomic volatile? Or Author though about threadsafe access?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm still waiting to see feedback from the original poster
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Drog, that's a very intriguing remark about String mutability... could you please hint how it's done (unless of course it's a JNI trick) ?

Thanks
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everybody

I read all postings. But what I think is nobody should dominate other like this. He might be new in this field. Thats why he asked such questions. The purpose of this forum (might be) to solve problems (& may be not to dominate other).
So please don't dominate others

Dear Navin first try to find out answers yourself.

Regards
 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sol Mam-Orn:
Drog, that's a very intriguing remark about String mutability... could you please hint how it's done (unless of course it's a JNI trick) ?

Thanks



Using reflection you can modify the underlying char[]. You can also use reflection to change a final variable. This is a bit dependant on what version of Java you are using and what, if any, security manager is in place.
 
D Rog
Ranch Hand
Posts: 472
Objective C Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing to add, thanks Steven.
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chandu Dharmadhikari:
He might be new in this field. Thats why he asked such questions. Dear Navin first try to find out answers yourself.



So, you expect the beginners to start with interview questions first? And, you advise them to find out the answers of those questions by themselves?
 
D Rog
Ranch Hand
Posts: 472
Objective C Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a good practice to be trained on common interview questions. Some people have a big success in that, when you read resume of person who jumped every 6 months from one big company to another. The problem is that big companies usually have very formalized interviewing process, so it isn't a big deal to figure how it works.

A bit off topic, I'd rather to have a separate forum My interview questions. It's a complex process to create really good interview questions, so it's helpful to exchange experience in this process. Currently, I do submit resume to any possible employer just to collect interview questions I can use later. Unfortunately many companies are lacking in good questions, how it was illustrated by original author of the thread.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All of my posts were supposed to hint that providing answers may be premature at the moment.

At the JavaRanch we prefer to teach or help people find the answers rather than handing the answer over. We also only have the poster's word that these are related to an interview and not homework - we don't do homework and if you provide anseers to homework assignments your post will probably be deleted.

Maybe I'm just being over-cautious in this case, but I'm wary of posters who ask a large list of questions with no answers and then never show up again.
 
Suman Sarker
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by D Rog:
It's a good practice to be trained on common interview questions.



Ofcourse, there is no harm in familiarizing oneself with interview questions but I dont think it's a good idea to do that before understanding the subject matter.
 
Navin Pillu
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

This is Navin. I'm a college student. These are the questions asked me in viva. I couldn't find answers for this, may be due to wrong (or triky) questions.

But people like you dicouraged me. I'll never post anything on this forum again. I'm a college student i mean i'm in the learning phase. And all of you, are professionals. That's why you are shouting at me like this. i'll also become a professional, but this is not a way to explain any thing to student.

I request you please cancel my registration. This is my last posting.

Thanks for your kind reply and good bye forever.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then you probably won't return so we can reply, but here it is anyway.

Nowhere in your original post did you mention where the questions came from or why you could not answer them, or that you were a student.

We're an extremely friendly bunch here at the Ranch and no-one shouted at you. If you're going to be that sensitive the internet may not be the place for you, there are far far worse places than this site. However, we prefer to assist in the learning process and try not to hand out answers without knowing whether it's an honest question (like yours) or a homework assignment.

Some of the initial posts would have been out of place and you would have received an appology if you had explained your postition as a student, but you prefer to storm off and slam this door shut. From our position we couldn't tell the difference between asking an honest question or doing someones work for them, so the posts remained.

If you decide to return to the Ranch you will be welcomed, if not I offer you our best wishes in future, but please try not to be so sensitive.

Thanks for creating some discussion though,
Dave.
[ May 25, 2005: Message edited by: David O'Meara ]
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Navin,

Just wanted to tell you, I am also a student. I have been a member here for a year and a half, and in my experience, the members here who have knowledge have been nothing but helpful. Maybe you didn't realize it, but to a native English speaker, the words "Answers expected" at the end of a query cause an extremely negative reaction. I don't know if you meant it that way, but for our (or at least my) ears, it sounds like a demand.

Noone here is shouting at you, we just find it inappropriate for you to just post a long list of questions and demand answers. You say that you will also become a professional; My advice to you would be to act like it. You will never learn the skills to become a professional by demanding others to do your work.

I think if you were to adjust your approach, and stay with JavaRanch, you will also make positive experiences with the people on this board.
 
Navin Pillu
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

Now I realized my mistake. My approach was wrong. It was a bit confusing. I'm extreamly sorry for that.

Thanks everybody for changing my mind.


 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats the spirit Navin.
Believe me this forum is the best amoung all the java forums.
I learned a lot from this forum.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the first response (by David O'Meara) is the most appropriate.

What have you come up with so far?
If nothing, where have you looked?
What keywords did you try in any Google searches?

Don't try to deal with the whole list. Pick one or two (if related) issues and start there.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way:
It's not too late to change the text in the subject of this thread
[ May 25, 2005: Message edited by: Ben Souther ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:
By the way:
It's not too late to change the text in the subject of this thread

[ May 25, 2005: Message edited by: Ben Souther ]



I helped him out with that.
 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know...looks like that Navin dude might have just been pulling everyone's leg...
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stephen Huey:
I don't know...looks like that Navin dude might have just been pulling everyone's leg...



I don't think so. English is a funny language, and when it might not be your first language, you might say something offensive, when you don't mean to.

I think Navin is sincere.

Navin, what is Viva?

Mark
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Spritzler:

Navin, what is Viva?



Its an oral examination. No, not a visit to your dentist!! Its an interview of sorts that is part of your grade on the course. IMHO the original poster has already had the exam and was curious to know the answers to some of the questions. Memory being a funny jumbler, especially of concepts you do not understand, some of the questions came out sounding arbitrary.

Navin - as others on the Ranch have pointed out, do make an effort to find the answers before posting and you will find a lot of knowledge here!

Just my $.02,
Sharad
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this is the quality of the questions being asked please let me know which company it is because I will make note to never interview there.
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Spritzler:

Navin, what is Viva?

Mark



An oral exam. viva voce at dictionary.com.

It is a commonplace phrase in the Indian education system.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by java whz:
If this is the quality of the questions being asked please let me know which company it is because I will make note to never interview there.



Kevin, it wasn't a job interview. It was a school course. We didn't understand that in the beginning, but now it has been cleared up.

Mark
 
money grubbing section goes here:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic