• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

anybody give me link to good source to read i/o streams

 
Ranch Hand
Posts: 817
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
answer the below questions and write the answer no. wiht them :-)


Q1

hii
can anybody give me link to good source to read i/o streams ?
I tried to read from books but its bit complicated and confusing...
and go above my head when to use particular stream in what situation ?
I understand 60% of streams but did'nt get clarity regarding when to use what like when to use bufferArrayinput stream and when to use Datainputstream.....
uuufff...



Q2

ok more question which is asked in my interview is that
is this static block is right


static
{
some code
}


or this is right ?

static abc:
{
some code;
}

I gave the answer that both r wrong as we can't call that particular block even using classname ? if it was funtion then we can call that

is i m right ?



Q 3

Ok another question that was asked is

say..
==========================================================

public class abc{
private static int a=10;
}
public class xyz{
public static void main(String args[])
{
System.out.println(abc.a);
}
}
==========================================================

I said it was not compiled as its declared as private ..it can't even be called by classname.variablename;

Q4
what is LinkedHashMap ?


Q5
why we override hashCode(); method in HashMap ? i mean why we write our won hashCode() method when there is default.. i read it from book but im not clear with the fundaa given there ?
so please tell me the detail reason...

Q6

there is sentence written
"One constructor can call another overloaded constructor of the same class by using this keyword" true/false ....answer was true but why ?
!!!. do we really do this ....we normaly use "super" for superclass constructor and "this" for current class constructor

=================================================================



Thanx and Regards,
Amit

don't mind i have put all question in one query......
thanx for co-operation...
:-)
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q1: See the I/O chapter of Bruce Eckel's Thinking in Java, http://www.faqs.org/docs/think_java/TIJ314.htm

Q2 & Q3: Did you attempt to compile these?

Q4: See the Java API for LinkedHashMap.

Q5: See the Java API for hashCode() in Object.

Q6: "this" has special meaning within constructors because if you were to call another constructor explicitly (by name), then you would create another object. See the "Initialization & Cleanup" chapter of Bruce Eckel's Thinking in Java (which also applies to your Q2), http://www.faqs.org/docs/think_java/TIJ306.htm
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic