I was expecting 12000000
Type: Posts; User: Grot
I was expecting 12000000
fixed the [code=java] part
Hey guys I'm a bit stuck here with my inheritance
package Lab3;
public class Building {
/* {author=John Roche sb12218, version=1.1}*/
// Attributes : Instance variables
The question is
-Write a class that represents a person. A person should have a name and an age.
-Write a Java program that implements a linked list using the LinkedList class:
-The program...
What I have done is it correct?
My problem is I have create five people objects with different names and ages and
add them to the LinkedList using the add(e) method. The program should then print out the names and ages of each...
Hey Guys I'm really stuck on a question here what I'm supposed to do is
Write a class that represents a person. A person should have a name and an age.
Write a Java program that implements a...
Thanks a lot Norm!
--- Update ---
Yes it work you're a legend!!!
Ok I got it working when I replace 52 with 104
My output is
7 of diamonds in black
4 of diamonds in red
Jack of spades in black
9 of hearts in black
Jack of hearts in red
My problem is I'm not sure where to fix this
Hello I'm getting an error in my code here
what I'm trying to do is output a shuffle of 5 cards e.g 4 of diamonds in red
package javacards;
import java.util.Random;
public class Deck {
What I'm trying to figure out is how do I loop through the enum with the switch statement and output it through the for loop
Hey I'm trying to Write a class called MonthTest.java that uses the enum Month and outputs the
following:
January has 30 days.
February has 28 days.
March 31 days.
…
December 31 days.
I'm...
The .showMessageDialog doesn't seem to appear, The code look correct yes?
Grot
Can anybody help me what I'm doing wrong here?
Grot
private void convertDtoEActionPerformed(java.awt.event.ActionEvent evt) {
double sol...
ok thanks Norm.
What does the String myS = myField.getText(); do?
I think “” is supposed to be "".
From when I see in this code is that
if a key 'a' is pressed something happens
and it creates a space.
Am I right?
I got this code from a book but it didn't explain it, I edited it there so you can see it better
Thanks for the help Norm! you're a legend!
@Override
public void keyPressed(KeyEvent e)
{
if (e.getKeyChar() == 'a' ){
String myS = myField.getText();
myLabel.setText(myS);
myLabel2.setText(“”);
}
}
The numbers are stored in a txt file e.g
Random PPS Number : 1911462N
Random PPS Number : 2714102K
Random PPS Number : 5070317E
Random PPS Number : 8030837K
Random PPS Number : 4358369S
I edited it there for you thanks
Grot
--- Update ---
import java.io.FileNotFoundException;
import java.io.PrintWriter;
Hey every I'm stuck with trying to generate 1000 random numbers that have 7 digits my code is here below
I don't know how to set it to a fix digit number, I know it's simple but it's doing my head...