The Artima Developer Community
Sponsored Link

Java Answers Forum
An easy question,but I don't know

17 replies on 2 pages. Most recent reply: Oct 5, 2005 9:35 PM by mausam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 17 replies on 2 pages [ « | 1 2 ]
bikash

Posts: 1
Nickname: liou
Registered: Sep, 2005

qustn on serilization Posted: Sep 27, 2005 8:56 PM
Reply to this message Reply
Advertisement
thre is no method in serilazation then who do all the things...
why we use?

why we use innerclass?

difference betwn implement thread and extends thread?

real deff betn vectos and arraylist
reply me.

Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: qustn on serilization Posted: Sep 27, 2005 11:37 PM
Reply to this message Reply
I DID have some problems to understand your questions.

I'll try to do my best

difference between implements / extends.

You can't implement Thread

Basics: You IMPLEMENT interfaces, you EXTEND abstract or non abstract classes.

A Class can onlya have one super class.
If you extend a non abstract class, you can simply add some of your own stuff.
if you extend a abstract class you must create the abstract methods of the abstract class.
This way the abstract class can use on some methods without actually have the code for them.

A class can implement multiple interfaces.
Interfaces just ensure that the class offers certain methods.
This way you can put access differerent classes through their iterface. You don't need to know wich class the objects have, you only need to know that they offer the method you want.


Inner classes.
These classes make it much more easy to name the classes.
This way you also can create a class wich should only be visible to one single class.


Vector and ArrayList
I don't really get the difference, don't know why ArrayList isn't just an extension to Vector.
An ArrayList can be converted easily into a Array.
The method names of Vector seems a bit more intuitive.

mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: An easy question,but I don't know Posted: Oct 5, 2005 9:35 PM
Reply to this message Reply
int a = 10;
int b=20;
a=a+b;
b=a-b;
a=a-b;

Flat View: This topic has 17 replies on 2 pages [ « | 1  2 ]
Topic: JSP - linking in domino:formlink Previous Topic   Next Topic Topic: Kanji input in text box

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use