Where am I wrong in this program? without print function with void in reverse functio it works fine.

public class Question1 {

    public static void main( String [] args ) {
        // TODO Auto-generated method stub

        char [] myName = { 'H', 'A', 'S', 'H', 'I', 'M' };

        char temp = reverse ( myName );
        print ( temp );

    }

    public static char reverse ( char [] array ) {

        for ( int i = 5; i >= 0; i-- ) {
            char reverseArray = array [i];
        }   
        return reverse;

    }

    public static void print ( char array ) {

        System.out.println ( array );
    }
}

Thankx!
this is not the the assignment. its just the program from lab class for practice.

I want to count the number of attempts the user tried to guess the correct guess. How would i do that?
like

I have thought of a number.
Try to guess it Take a guess: 5
Your guess is higher than mine
Take a guess: 3
Your guess is lower than mine
Take a guess: 4
Good job! You guessed the number in 3 tries.

import java.util.*;
class task3344
{
    public static void main (String [] args)
    {
        Scanner scan = new Scanner (System.in);

            int random = 1 + (int)(Math.random() * 9);
            System.out.println (random);

            int guess = 0;

            do
            {
                System.out.println ("Take guess: ");
                guess = scan.nextInt();

                if (guess > random)
                {
                    System.out.println ("your guess is high");
                }
                else if (guess < random)
                {
                    System.out.println ("your guess ins low");
                }
                else 
                {
                    System.out.println ("good! you guessed correct");
                }
            }
            while (guess != random);

    }
}

Ok thanks for your help!

@Lucaci Andrew
Thanks this works. But why we are adding min and also subtracting min? What difference does it makes?

Can any one help me writing code which can only creat three digit random number not two digit or one digit number? Following code creates 3 digti but also creats two and one digit number..

public class random 
{
    public static void main (String [] args) 
    {
        double n = Math.random();
        long n3 = Math.round(Math.random()*1000);
        System.out.println (n3);
    }   
}