Search:

Type: Posts; User: OA-OD-JD1

Page 1 of 2 1 2

Search: Search took 0.11 seconds.

  1. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    I've decided to continue the blog here (now that I've received blogging permissions).
  2. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    This blog has been continued over at Java Development Forums and in my JPF Blog.

    Harvey's Java Blog
    JD1's Personal Development Blog
  3. Replies
    70
    Views
    7,971

    Summing The Elements of An Array

    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};...
  4. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    Thanks mate. I'll be sure to take a look some time.
  5. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    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.
  6. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    Understood. Can you tell me why you put the square brackets after the data type instead of the array name?
  7. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    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?
  8. Replies
    70
    Views
    7,971

    Arrays

    Arrays are used to store many values under the one variable, so to speak. You can initialise an array the long and drawn out way by manually assigning each index a value or you can implement an array...
  9. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    Alright, I'll keep that in mind. Once again, I'd like to thank you for all your help today. I really appreciate it! :-*
  10. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    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...
  11. Replies
    70
    Views
    7,971

    Random Number Generator

    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...
  12. Replies
    70
    Views
    7,971

    Math Class Methods

    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...
  13. Replies
    70
    Views
    7,971

    Do While Loop

    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...
  14. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    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...
  15. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    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.
  16. Replies
    70
    Views
    7,971

    Compound Interest Calculator

    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...
  17. Replies
    70
    Views
    7,971

    For Loops

    The For Loop is probably the most common loop used in any programming language. Here's how it works in Java.


    class Class1{
    public static void main(String args[]){
    for(int counter=1;...
  18. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    That's what I'm trying to do. This is what I ended up with. No errors, but it won't let me input anything into the console.

    /* The application will work as follows. The main method will be used to...
  19. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    Okay, with relevance to my last post about the averaging calculator, I've written up the application exactly as I'd like it to look. The only problem is the variables, that's the last step. I've...
  20. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    Not sure what any of that means, sorry. I'm still new to this and I'm not 100% on sending variables through methods and objects yet. Any chance you could provide an example?
  21. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    I forgot to mention that. I actually haven't yet learned about the functionality of these comments, so I'll make sure to edit that post when I know what I'm talking about. Thanks for pointing that...
  22. Replies
    70
    Views
    7,971

    Simple Averaging Program

    What this application does is collects a number of inputs from the user via a scanner. These inputs are numbers. They are then averaged and the average is outputted. Pretty simple stuff.

    import...
  23. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    So, basically, I'm limited to the amount of things I can do in the Conditional Statement? Whereas in an If Statement, you can really have as many instructions as you want. I suppose I can only output...
  24. Replies
    70
    Views
    7,971

    Scanners

    I forgot to write about the scanner, so I'm going to do that now.

    Basically, a scanner is used to get information from the user. At this stage, the scanner will be used only to gather information...
  25. Replies
    70
    Views
    7,971

    Re: JD1's Personal Development Blog

    I suppose you're right in saying that. The extent of my knowledge at the moment has the conditional operator acting like an If Statement in my head. Hopefully that will change when I start learning...
Results 1 to 25 of 45
Page 1 of 2 1 2