Pavan SridharaMurthy

Greenhorn
+ Follow
since Oct 17, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pavan SridharaMurthy

Sorry.. I forgot to mention this...
Im on Windows XP platform..
Using JDK1.6.0 and JRE1.6.0
11 years ago
JSP
I am currently using eclipse for the project but im doing all the examples from the book at command prompt and this is where im having trouble... the BeerSelect and BeerExpert programs don't compile at all...

i have 2 programs[as given in the book] one BeerExpert.java which is in the folder
c:\java\xyz\beerv1\src\com\example\model\BeerExpert.java
In the BeerExpert.java I have included it into a package as

package com.example.model;

the other BeerSelect.java which is at
c:\java\xyz\beerv1\src\com\example\web\BeerSelect.java

and in the file BeerSelect.java Im importing it as

import com.example.model.*;

And im compiling at my cmd prompt as

c:\java\xyz\beerv1> javac -classpath programfiles/apachesoftwarefoundation/tomcat5.5/common/lib/servlet-api.jar:classes: -d classes src/com/example/model/BeerExpert.java


And the warning im getting is

Note: src/com/example/model/BeerExpert.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

This is the code from the book.[for BeerExpert.java]

package com.example.model;
import java.util.*;

public class BeerExpert {

public List getbrands(String color) {

List brands = new ArrayList();

if (color.equals("amber")) {

brands.add("Jack Amber");
brands.add("Red Moose");
}

else {

brands.add("Jail Pale Ale");
brands.add("Gout Stout");
}

return(brands);

}
}


Could you please tell where Im going wrong here..?
11 years ago
JSP
Thanks a bunch for replying Amit...
I'll keep that in mind.. And that is a real nice link..
11 years ago
JSP
Thanks a lot for replying...
Right.. I'll watch that subject line next time..

yes im workhing.. I just started my training 3 months back.. we were asked to learn java in a fortnight.. and now we've been given the project that i've mentioned earlier..

by IDE you mean somkething like eclipse??
and without it is like working from command prompt..right???
11 years ago
JSP
Hi.. [This is my first post.. Kindly excuse me if my post does not conform to the T&C of this forum!;)]

Im a newbie.. [not just to this forum but to java as well..!]

I started learning java from HeadFirst from last week and have managed to pick up a handful of concepts. I could only do four chapters from that book because.. I have to currently design a project i.e. create a webpage that accesses a database and allows user to add/modify/delete data from it..So i've conveniently started referring HeadFirst JSP simultaneously..

I'd appreciate it if somebody could give me a few tips on how i should get along with the project...

This is what i've accomplished as of now:

Created the database [im working with Oracle 10G]
Created the login page[using HTML]
For the next steps on linking the page to the db i started reading HF JSP and i've read up till MVC concepts and the beerselect page program..

I think i might be losing it a lil bit here...
[ October 20, 2008: Message edited by: Pavan SridharaMurthy ]
11 years ago
JSP