Today i read about short hand opperators and how to get user input. I updated my seconds2minutes calculationprogram. I modified the assignment of the variable to:
int seconds = Integer.parseInt(JOptionPane.showInputDialog(null, "How many seconds?"));
Here is the executable
2/05/2009
2/03/2009
Calculate Circle Area
Since last time i blogged i learned about identifiers, variables, assignment statements and assignment expressions, constants and numeric data types and operations. Today i created a simple little program to calculate how minutes out of seconds. It's a really basic program and it also doesn't work with user input (YET!).
Here is the code:
import javax.swing.JOptionPane;
public class seconds2minutes {
public static void main(String[] args) {
int seconds = 500;
int minutes = seconds/60;
int remainingSeconds = seconds % 60;
JOptionPane.showMessageDialog(null, seconds + " seconds is " + minutes+ " minutes and " + remainingSeconds + " seconds");
}
}
I also uploaded an executable jar (which i finally figured out how to create in jBuilder!) Here is the link.
Here is the code:
import javax.swing.JOptionPane;
public class seconds2minutes {
public static void main(String[] args) {
int seconds = 500;
int minutes = seconds/60;
int remainingSeconds = seconds % 60;
JOptionPane.showMessageDialog(null, seconds + " seconds is " + minutes+ " minutes and " + remainingSeconds + " seconds");
}
}
I also uploaded an executable jar (which i finally figured out how to create in jBuilder!) Here is the link.
1/27/2009
Today i got started on the book. I read a lot today because i already knew most part of it. I read about programs, operating systems, number systems, java in the world wide web, java language specifications, a simple java program, creating, compiling, executing, anatomy of a java program, displaying text and JOptionPane.
1/26/2009
My Independent study
I haven't written anything in this blog yet but my independent study has already been running for a week.
So I've been thinking about to buy this book
http://www.amazon.com/Introduction-Java-Programming-Comprehensive-Version/dp/0136012671/ref=sr_1_1?ie=UTF8&s=books&qid=1232725512&sr=8-1
Which seems perfect to me. I already ordered it and it will arrive soon i guess. The last week i've basically been trying to understand classes. This is a very difficult topic. Classes itself are easy to understand but as soon as it comes to polymorphism it's getting really confusing. So ive done a lot of research over the internet. As the main resource i used the free version of bruce eckel's thinking in java. He offers an old version of his book for free for download from the internet. You can download the book from here: http://www.mindview.net/Books/TIJ/
So now i think ill receive this book soon and then will take a complete restart on java. I have a basic overview over java and think i more or less understand the basic concepts of it. Now when i restart on it those explanations will make more sense to me because i understand where i actually will have use for them.
So I've been thinking about to buy this book
http://www.amazon.com/Introduction-Java-Programming-Comprehensive-Version/dp/0136012671/ref=sr_1_1?ie=UTF8&s=books&qid=1232725512&sr=8-1
Which seems perfect to me. I already ordered it and it will arrive soon i guess. The last week i've basically been trying to understand classes. This is a very difficult topic. Classes itself are easy to understand but as soon as it comes to polymorphism it's getting really confusing. So ive done a lot of research over the internet. As the main resource i used the free version of bruce eckel's thinking in java. He offers an old version of his book for free for download from the internet. You can download the book from here: http://www.mindview.net/Books/TIJ/
So now i think ill receive this book soon and then will take a complete restart on java. I have a basic overview over java and think i more or less understand the basic concepts of it. Now when i restart on it those explanations will make more sense to me because i understand where i actually will have use for them.
Subscribe to:
Comments (Atom)