bobby Varghese

Greenhorn
+ Follow
since Feb 12, 2009
Merit badge: grant badges
For More
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 bobby Varghese

BufferedReader stdin = new BufferedReader
15 years ago
public class Animal extends SimpleElement
{
public final static int MAMMAL = 1;
int animalClass;
String name, species, habitat, food, temperament;
FoodRecipe foodRecipe;
public void setName( String name )
{
this.name = name;
}
public String getName()
{
return name;
}
public void setSpecies( String species )
{
this.species = species ;
}
public String getSpecies()
{ return species;
}
public void setHabitat( String habitat )
{
this.habitat = habitat ;
}
public String getHabitat()
{
return habitat;
}
public void setFood( String food )
{
this.food = food ;
}
public String getFood()
{
return food;
}
public void setFoodRecipe( FoodRecipe recipe )
{
this.foodRecipe = recipe;
}
public FoodRecipe getFoodRecipe()
{
return foodRecipe;
}
public void setTemperament( String temperament )
{
this.temperament = temperament ;
}
public String getTemperament()
{
return temperament;
}
public void setAnimalClass( int animalClass )
{
this.animalClass = animalClass;
}
public int getAnimalClass()
{
return animalClass;
}
public void setAttributeValue( String name, String value )
{
if ( name.equals("class") && value.equals("mammal") )
setAnimalClass( MAMMAL );
else
throw new Error("No such attribute: "+name);
}
public String toString()
{
return name +"("+species+")";
}
}
15 years ago
Please...am a beginner in the field of JAVA.
Can anybody give me a hint to write an easy code?
Thank you
15 years ago
Write a program that will start with a double called sum set to zero. Add 0.1 to sum 1000 times by using a for loop.

Print the sum, and then print a statement of whether or not the sum is equal to 100.
15 years ago
Hi, i am a beginner in JAVA. I want to study the basic things like syntax, and all the things included to write a program.
Can anybody help me with studying the basic in JAVA??
Thank you.
15 years ago