Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Interview questions

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

I went through some interview questions in this forum just to refresh my knowledge on the concepts. I might also appear for an interview in the near future. can someone confirm this answers for the questions mentioned.

1.What are the type of protocols used in HttpServlet ?
HTTP is the widely used protocol.
we can also use SMTP,POP,FTP

2.Is there any heavy weight component in Swings ?
no. Swings are light weight components. AWT has heavy weight components

3.what are the different types of multithreading?
No idea. I referred a couple of books on threads but couldn't get what i wanted. Any explanation would be appreciated.

-sanjana
 
Ranch Hand
Posts: 538
Hibernate Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !

I would say (IMHO) :

1) Not OK, HTTP only.

2) Totally OK.

3) green threads and native threads, former are a Threads mechanism controlled by JVM itself so platform independant, latter are as their name states calls to native platform system multithreading features so relies on platform when available (much more efficient of course).

Beast regards.
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sanjana,

I recall that Swing components are built above AWT.

So, Swing components are heavy-weight compared to AWT.

Dan
[ August 13, 2004: Message edited by: danny liu ]
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by danny liu:
sanjana,

I recall that Swing components are built above AWT.

So, Swing components are heavy-weight compared to AWT.

Dan

[ August 13, 2004: Message edited by: danny liu ]



Danny Liu

Your answer is incorrect.
Please read this for details on the weight of Swing components.

[ November 04, 2004: Message edited by: peter wooster ]
[ November 04, 2004: Message edited by: peter wooster ]
 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

2.Is there any heavy weight component in Swings ?
no. Swings are light weight components. AWT has heavy weight components



No Eric, You're wrong. Swings are based on AWT. Though swing components are light weight components, there are still 4 components which are heavy weight in swings viz JWindow, JApplet, JFrame and JDialog.

Grishma
 
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by danny liu:
peter wooster

When you KNOW NOTHING about a topic, please refrain from dumping your ignorance on those who ask for assistance.
You obviously know NOTHING about Java Swing, have you ever been there?



This type of posting is very inappropriate. Feel free to correct other people if you think they are wrong, but personal attacks have no place on this site. I strongly encourage you to edit your message ASAP.

--Mark
 
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i would agree with peter, swing is light weight component
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Alvin chew:
i would agree with peter, swing is light weight component



Actually, Grishma is correct on this, the top level components are heavyweight and all the rest are lightweight. That's what makes that interview question interesting. Its explained in the Sun document I linked to, under the heading "Heavy vs light: the differences".
 
Eric Lemaitre
Ranch Hand
Posts: 538
Hibernate Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all !

I believe we should stop quarelling/arguing about this point, we almost all learned main difference between AWT and Swing was Heavyweight against Lightweight, so I consider as a slight minor fault only believing all Swing is Lightweight.
We have too such "traps" in our job interviews about IT culture such as "who leads Microsoft", but we don't eliminate people who answer "Bill Gates" instead of "Steve Balmer", avoiding this trap is a simple nice bonus.
The article was interesting, thanks for the link, I will know more about this subject for next time.

Best regards.
 
Mark Herschberg
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by peter wooster:


Danny Liu

Please check your references before advising on topics you know nothing about, people come here for informed assistance.
Look here for enlightenment on the weight of Swing components.



Peter, I appreciate that you edited your message once, but it's still unncessarily hostile. Consider the following phrasing, for example,

"That is incorrect, as explained in the reference here."


--Mark
 
This tiny ad will self destruct in five seconds.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic