Win a copy of Head First Android this week in the Android forum!

Amit Parnerkar

+ Follow
since Apr 24, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Amit Parnerkar

I have read the Webapp example in demo samples of JasperReport but still could not solve the problem.
I am displaying a simple HTML report on the fly using servlet and it is not getting displayed in proper format. When I run this without using servlet and export it as HTML file, I observed it creates an image in a directory called reportname.html_files/px (and my guess is that this image is not getting displayed when I generate HTML on the fly) I am using the code given below to display the HTML on the fly and any image it is using. Can somebody please help me in figuring out as why this is not working?? Any help is appreciated.

jPrint = JasperFillManager.fillReport(compiledInputStream, parameters, datasource);

PrintWriter out = response.getWriter();
JRExporter exporter = new JRHtmlExporter();
Map imagesMap = new HashMap();
request.getSession().setAttribute("IMAGES_MAP", imagesMap);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image?image=");


17 years ago
I prepared for 3 weeks and got 90% in the exam. I agree with Chris that If you finish the exam early then do the revision (I did the same)
Thank you to Dan Chisholm and Marcus Green for excellent exam material and finally to all Javaranch members
Thank you
17 years ago
Thanks Anil and Barry, I think I was confused with single "&". This explanation really helps
Thank you
Can someone please explain me how can we get output 122.
This example is from Marcus Green exam.

According to me in both if blocks the second condition won't get executed because the first condition is false. So at line 1, i=1, at line 2 also, i=1 and at line 3 x is 0, how can the output be 122??
(code taggs added)
[ May 09, 2004: Message edited by: Barry Gaunt ]
Can someone help me here?
class A {void m1(A a) {System.out.print("A");}}
class B extends A {void m1(B b) {System.out.print("B");}}
class C extends B {void m1(C c) {System.out.print("C");}}
class D {
public static void main(String[] args) {
A c1 = new C(); C c2 = new C(); c1.m1(c2);
The output will be "A". I understand that method m1() is being overloaded here and not inherited, hence c1.m1(c2) will invoke class A's m1() method. Just wondering if I am thinking in right direction or missing something here?
I tried to compile the above code in j2sdk1.4.1_05 and J2SDK.v.1.2.1 and its giving compile time error in both
"Reference to aMethod is ambiguous. It is defined in void aMethod(float) and void aMethod(int)"
I have one more doubt, can I use Khalid Mugal SCJP1.2 book for preparing SCJP1.4 exam? (Ofcourse I will not study AWT and IO from the book)or should I buy the new book?
In SCJP1.4, which topic is considered to be hardest in the actual exam or where do people usually tend to make mistakes?
Hello Murali,
I tried to download the notes from the link specified earlier but its not working. Can you please send me the SCJP notes at
I really appreciate your time..
public class TadKebab{
public static void main(String argv[]){
new TadKebab();
private TadKebab(){
String[] Sa = {"Sam Smith", "John Smith"};
public void getName(String s[]){
This code is working and printing "Coors". I was wondering if we defined the constructor as private then how can we invoke it in the main method?