I need help with a java program to query
https://www.pravdareport.com
https://pravda.ru
https://www.lefigaro.fr
https://www.independent.co.uk
and display everything between the first occurrence of the tags
<title> and </title>
Things like <whatever> are called HTML tags. The </title> ends the tag <title>.
If a webpage contains
<title>Sophie, Sally and Jack</title>
your program should print
Sophie, Sally and Jack
If no <title> ... </title> tags appear, print a message such as "No <title> was found in http://pravda.ru."
You may assume that if <title> and </title> occur, they occur in the same line of the file.
Your program should handle any thrown exceptions with an informative message.
sectetur adipiscing elit. Nam
sectetur adipiscing elit. Nam lac
sectetur adipiscing
sectetur adipiscing
sectetur adipiscing elit. Nam lacinia pulvinar tortor nec
sectetur adipiscing
sectetur adipiscing elit. Nam lacinia
sectetur adipiscing elit.
sectetur adipiscing elit. Nam l
se
Unlock access to this and over
10,000 step-by-step explanations
Have an account? Log In