Welcome Claretha.
Welcome Claretha.
I've decided to continue the blog here (now that I've received blogging permissions).
This blog has been continued over at Java Development Forums and in my JPF Blog.
Harvey's Java Blog
JD1's Personal Development Blog
Hi,
public static void main(String[] s);
Since this is your method, you're going to need curly braces afterwards to encase the rest of your code from within that method.
public static...
Howdy,
When I'm bored, I do this thing where I go into localhost and start creating forums. Inspired by JPF, I've created my own Java-related forum, JavaDevelopmentForums. It only went live today,...
I suppose that would be a good way to organise your head. If you're a visual learner, you'll be able to see exactly what needs to be done and where.
Welcome aboard, mjr. I'm new also, but already I've learned a lot. You'll enjoy it here.
So you write the comments before actual Java code? I've never heard of that before. Does it work well?
Say we have an array with ten indices. Below is how we can calculate the sum of these indices.
class Class1{
public static void main(String args[]){
int[] array1 = {1,2,3,4,5,6,7,8,9,10};...
Not sure what the likelihood of you finding someone like this is, but by all means look around. You can get all the help you need here.
Thanks mate. I'll be sure to take a look some time.
Okay. In other languages, I've been used to doing it the way I orginally did, but since what you mentioned is standard Sun convention, I'll be sure to stick to that in the future.
Understood. Can you tell me why you put the square brackets after the data type instead of the array name?
In future, please use the Java highlighting code.
Be sure to post in the right section also.
And I'm glad you're providing these tips. This is the sort of thing I need. Also, with your example there, are you referring to an array initialiser with no indexes?
Alright, I'll keep that in mind. Once again, I'd like to thank you for all your help today. I really appreciate it! :-*
Hi,
Some of that is still new to me. I still can't get my head around any of what you've written (since you're using alternative code). It's difficult for me to relate that back to my problem, let...
Random numbers can be used in Java. Here's a small random number generator and how it works.
import java.util.Random;
class Class1{
public static void main(String args[]){
Random dice = new...
There are many built in methods we can use to conduct mathematical operations to numbers. Here are some of them.
class Class1{
public static void main(String args[]){
//How far number is from...
We use the Do While Loop when we want to run a set of instructions before testing to see if a condition is true. The difference between a Do While Loop and a While Loop is that the While Loop tests...
If I go back to my last successfully working averaging calculator, Mr.777, I have two questions.
import java.util.Scanner;
class Class1{
public static void main(String args[]){
int numGrades...
Still not sure how to do that. I tried something just now but that didn't work either. I'm kind of more guessing where things go with this one. Can't quite get my head around the best way to do this.
Compound interest can be calculated with the following formula.
A = Amount
P = Principal
R = Rate
n = Years
A=P(1+R)^n
We can calculate the amount in Java as shown below. We currently...