program output using a seperate package
<p>I'm learning about packages. I have two classes that are in different packages and I seem to be having an issue with my output. </p>

<p>Here is the class with the main:
My two issues are with the bottom two sections "required string test" and "String choice test" </p>

<pre><code>import myUtils.util.Console;

public class ConsoleTestApp
{
public static void main(String args[])
{
    // create the Console object
    Console c = new Console();

    // display a welcome message
    c.println("Welcome to the Console Tester application");
    c.println();

    // int
    c.println("Int Test");
    int i = c.getIntWithinRange("Enter an integer between -100 and 100: ", -101, 101);
    c.println();

    // double
    c.println("Double Test");
    double d = c.getDoubleWithinRange("Enter any number between -100 and 100: ", -101, 101);
    c.println();

    // required string
    c.println("Required String Test");
    String s1 = c.getRequiredString("Enter your email address: ");
    c.println();

    // string choice
    c.println("String Choice Test");
    String s2 = c.getChoiceString("Select one (x/y): ", "x", "y");
    c.println();
}
}
</code></pre>

<p>here is the code for the class they are accessing. (this is the Console class that was imported at the top of the main)</p>

<pre><code>package myUtils.util;
import java.util.Scanner;

public class Console 
{           
Scanner sc = new Scanner(System.in);

/******************************************************/
public void println()
{       

}   

/******************************************************/
public void print(String s)
{
    System.out.println(s);
}

/******************************************************/
public void println(String s)
{
    System.out.println(s);      
}

/*****************************************************/
public int getIntWithinRange (String prompt, int min, int max)
{
    int i = 0;
    boolean isValid = false;
    while (isValid == false)
    {
        System.out.println(prompt);
        if (sc.hasNextInt())
        {               
            i = sc.nextInt();
                if (i &lt; min)
                {                       System.out.println
                    ("Error! Please enter an integer greater than -100");
                }                   
                else if (i &gt; max)
                {
                    System.out.println ("Error! Please enter an integer less than 100");
                }
                else
                    isValid = true;
        }
        else
        {
            System.out.println ("Error! Invalid number value");
            sc.nextLine();
        }   
    }
    return i;
}

/*****************************************************/
public double getDoubleWithinRange (String prompt, double min, double max)
{
    int d = 0 ;
    boolean isValid = false;
    while (isValid == false)
    {
        System.out.println(prompt);
        if (sc.hasNextInt())
        {               
            d = sc.nextInt();
                if (d &lt; min)
                {
                    System.out.println ("Error! Please enter a number greater than -100");
                }
                else if (d &gt; max)
                {
                    System.out.println ("Error! Please enter a number less than 100");
                }
                else
                    isValid = true;
        }
        else 
        {
            System.out.println("Error! Invalid number value");
            sc.nextLine();
        }
    }
    return d;
}

/*****************************************************/
public String getRequiredString(String prompt)
{
    String R = "";
    boolean isValid = false;
    while (isValid == false)
    {
        System.out.print(prompt);
        R = sc.nextLine();
        if (R.equals(""))
        {
            System.out.println("Error! This entry is required. Try again.");
        }
        else
        {
            isValid = true;
        }
    }
    return R;
}   

public String getChoiceString (String prompt, String s1, String s2)
{   
    String s = "";
    boolean isvalid = false;
    while (isvalid == false);
    {           
        s = this.getChoiceString(prompt, s1, s2);
        System.out.println(s);
        s = sc.nextLine();
        if (!s.equalsIgnoreCase(s1) &amp;&amp; !s.equalsIgnoreCase(s2))
        {
            System.out.println("Error! Entry must be '"+
                s1 +"', '"+ s2 +"', or '."+  "Try again.");     
        }
        else
        {
            isvalid = true;
        }
    }
    return s;   
}       

public int getInt(String prompt)
{
    return 0;   
}
}
</code></pre>

<p>The issue I am having with the getRequiredString is I have a line of code that says </p>

<pre><code>    R = sc.nextLine();
</code></pre>

<p>This is causing my output to print my error message because it thinks the user didn't enter anything. When I change it to a simple</p>

<pre><code>    R = sc.next();
</code></pre>

<p>The code doesn't let the user enter anything. I'm unsure what to do to fix this.</p>

<p>The issue I am having with my getChoiceString is the program isn't printing anything. It seems that section of code won't print my prompt or any of the other elements. </p>

<p>I'm new and this is homework so any hints, clues, or help walking me through this is appreciated.</p>
