Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Isn't this interview question too difficult??

807603Feb 12 2008 — edited Feb 13 2008
Hello,

I was asked to write a java code(given below) in around 20 mins in an interview.
I was not able to solve it, do you think this is too difficult or I need more practice??

Q Implement the class of arraylist given below without importing java.uti*
(I had to write code within the methods as if I am inventing an arraylist
You can see the code that I am supposed to write here http://209.85.165.104/search?q=cache:YJ804VTiDXEJ:www.docjar.com/html/api/java/util/ArrayList.java.html+source+code+for+arraylist&hl=en&ct=clnk&cd=1&gl=us&ie=UTF-8&client=firefox-a
but without importing java.util*

public class MyArrayList {
public Object get(int index){
return data[index];
}
public Object remove(int index){
}
public int indexOf(Object e){
}
public int size(){
return size;
}

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2008
Added on Feb 12 2008
63 comments
404 views