File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes else with out if Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "else with out if " Watch "else with out if " New topic

else with out if

sandeep Talari
Ranch Hand

Joined: Dec 24, 2007
Posts: 63
import java.util.*;

<pre name="code" class="core">public class BeerExpert
public List getBrands(String color)
List brands= new ArrayList();
brands.add("This is what i sujjested green");
brands.add("And simply proceed for that");
brands.add("nobody uses this ");
return (brands);

i'm un able to find the problem .

[edit]Add code tags. CR[/edit]
[ July 17, 2008: Message edited by: Campbell Ritchie ]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14741

Look at this line:


There is a ; that should not be there.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Rakesh Chaudhary
Ranch Hand

Joined: Feb 19, 2008
Posts: 120
Oh that was very Fast jasper

I was compiling it to find the error..
I agree. Here's the link:
subject: else with out if