Basically what I want to do is add a prefix (input by the user) to be added on a chosen word by the user. Is that posible? I got stuck and don't know what to do.... Here's what I have so far.
// The "Prototype" class.
import java.awt.*;
import hsa.Console;
public class Prototype
{
static Console c; // The output console
public static void main (String[] args)
{
c = new Console ();
String prefix;
String word;
String sentence;
c.print ("Enter the prefix: ");
prefix = c.readString ();
c.print ("Enter the word to add the prefix to: ");
word = c.readString ();
c.print ("Enter the sentence: ");
sentence = c.readString ();
if (sentence == word)
{
c.print (prefix.concat (word));
}
} // main method
} // Prototype class
I know that my if statement is wrong... And yeah I got stuck..