Good advice from good people is worth its weight in gold!!
Thank you Graeme, I used parseInt and solved it.
I hope that this one of my possible solutions will be an inspiration and useful to others.
package bibi;
import javax.swing.JOptionPane;
public class Bibi {
public static void main(String[] args) {
String bibi;
bibi = JOptionPane.showInputDialog("Please enter your age:");
int year = Integer.parseInt(bibi);
if (year >= 18) {
System.out.println("All OK - go for it!");
}
else
{
System.out.println("No, No");
}
}
}