while (true) {
String age = scanner.nextLine();
try {
int userage = Integer.parseInt(age);
user.setAge(userage); break;
} catch (NumberFormatException e) {
System.out.println("Error age try again");
}
}
System.out.println(user);
$data = intval(file_get_contents('http://www.site.com/?key=123&query=abcd&format=xml'));
$data = intval(file_get_contents('http://www.site.com/?key=123&query=abcd&format=json'));
$data = intval(file_get_contents('http://www.site.com/?key=123&query=abcd&format=html'));
и т д
таблица category
id | name
таблица news
id | name
таблица catenews
idcategory | idnews