Dear all,
I have a program to code which would take several lines of input from user (a fruit name, it's price per kg and the number of kgs sold). Each seperated by a space. It would then output the total money made and the name of the fruit that made maximum sales. And, it would use sentinel "Stop" to halt the program.
Now, I know this is fairly easy to write. But, I have never used strings and I don't know where to begin. Hints?

this is what I have managed to write yet

import java.util.Scanner;

public class Q3_new{
    public static void main (String []a){
        Scanner input = new Scanner (;
        String nameFruit= "";
        int priceFruit;
        int Profit=0 ;  
        int kgSold= 0;

               System.out.print("Please enter name of the fruit, price and kg sold");

             while (!nameFruit.equals("Stop"))

actually, I would write it a bit like this:

nameFruit =;
while (!nameFruit.equalsIgnoreCase("Stop")){
  // read price and sold
  // add code to handle information

  nameFruit =;

for more precise answers, you may want to clarify your question a bit further.