27.04.2013 Views

330 Java Tips.pdf - FTP Server

330 Java Tips.pdf - FTP Server

330 Java Tips.pdf - FTP Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

General <strong>Java</strong> Questions I<br />

Because constructors are never inherited and so will never have the oportunity to be<br />

overridden, final would have no meaning to a constructor.<br />

Q: In <strong>Java</strong>, does exist a function like sprintf in C ?<br />

Answer: http://www.efd.lth.se/~d93hb/java/printf/index.html a free <strong>Java</strong> version of<br />

fprintf(), printf() and sprintf() - hb.format package<br />

Q: If I declare an array of an objects, say Dogs, is that memory taken when I<br />

create the array or when I create the objects in the aray when I declare this array:<br />

Dog[] dog = new Dog[100];<br />

or does it take the memory when I actually create the Dogs in the array eg:<br />

for(int i = 0;i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!