Eric Mullins

Greenhorn
+ Follow
since Jan 08, 2018
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Eric Mullins

Thanks everyone who posted it has helped me and I understand more. Eric
5 years ago
* Write a description of how to choose a string.
* Only one string can be choose. The string is separate from the other string.

if a is the choice = Hey
if b is the choice  = Man

I hope this makes sense, Thanks Eric
5 years ago
Thanks for your reply. This is not a school assignment I am just practicing to get ready for school.

I do need to be more detailed and I am wanting to the program to do. Please only choose String A or B.
After that I will work on it I just want to be able to Choose A in the terminal and it would print out text Hey.
If in the terminal you choose B it would print out Man in the terminal. I hope this makes sense. Eric and Thanks
5 years ago
I am having trouble with a simple code that has to do with choosing a string.
Here is the code and thanks for all the support and help ahead of time. Eric

import java.util.Scanner;
/**
* Write a description of how to choose a string.

*/
public class StringAB
{
   public static void main (String [] args) {
       System.out.println("Please Choose String A or B");
       Scanner input = new Scanner (System. in);
       String name = input.nextLine();

       String A = "Hey";
       String B = "Man";
       System.out.println(B);
       System.out.println(A);
   }
}
5 years ago
Thanks for your reply. I am just wanting to have a System.out.println("Choose a string");

String a = Hey;
String b = Man;

I hope this makes sense I just am trying to first learn the basics and then I can do something more later. I just want to be able to choose one of the two strings in the terminal. Thanks to all of you
6 years ago
Thanks to all of you and I am in the process of self teaching prior to school next semester and just getting some basics. Very new to Java and look forward to learning.
I am just wondering how to choose a string how to choose a string form 2 strings and on the terminal choose string a =  "Hey";   and another string  b = "Man";

I hope this makes sense. Appreciate all of your help from forum.
6 years ago