No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
Hi, Im new to java, mostly done networking in the past, im trying to create a program that will run a basic simulation of a number of heats for a 100m sprint. It mostly about the use of collections so nothing to complex but im completly lost. I've created a … |
|
Re:
I need to converted from seconds to hours, minutes and seconds. (without using if) and this is my code [CODE]import java.util.Scanner; public class SecondToHoursAndMin { public static void main (String[]ages) { Scanner in = new Scanner (System.in); int second; System.out.println("Enter the second: "); second = in.nextInt(); int hours,minutes,second1; hours=(second/3600); minutes=(second%60); … |
|
Re:
The code below is the file for the constructor method and the get methods [code] //Date: 3/18/2010 public class Taxpayer { private int socSec; private double yearlyGross; public Taxpayer(int taxPayer, double income) { socSec = taxPayer; yearlyGross = income; } public int getSocSec() { return socSec; } public double getYearlyGross() … |
|
Re:
I have a java project that I need help on. The program is for word occurrences and I have a basic add() and frequency() methods I need help creating, not sure how to begin. here is the skeleton I am working with: [CODE]@Override public void add(final String word, final int … |
|
Re:
Alright, this is for a project designed to make us use inheritance. This is Creature, which is a subclass of Thing. Creature is supposed to be able to eat, move and tell what it ate. Here are my issues: 1. How do I use a constructor from Thing in Creature? … |
|
Re:
Hey:) I am creating a project in java,but have been sick for the passed 3 weeks, so I am a bit stuck on how some of the code should look,and where it should be the details are that I am required to develope an application that will allow the user … |
|
Re:
ShoppingListItem.java [CODE=java] package problem2class; public class ShoppingListItem { private String name; private int numOfItems; private double price; public ShoppingListItem(String name, int quantity, double pricePerUnit) { this.name = name; numOfItems = quantity; price = pricePerUnit; } public String getName() { return name; } public void setName(String name) { this.name = name; … |
|
So here's the rundown. I have a base class, I want to put a clickHandler in it because all of my subclasses will need it, but they will all execute different code when it is triggered. My question is, how can i have a clickHandler in my base class and … |
|
Ok, so I've been stuck for a little while now on this problem. I'm trying to pass an array of Tabs and I'm just not doing it correctly. I believe I'm missing something simple, because I need to learn more about what is happening with my code rather than just … |