title: Get brief content from Wikipedia by a Java Program
body: <p>Okay, so I am writing a Java program which requires me to search the web and display data. As every smart individual would do, the best place to search for information is Wikipedia.</p>
  
  <p>I did some looking around and found MediaWiki, but I have no idea where to start. I'll explain what I need, and all help is appreciated!</p>
  
  <p>Example:
  User input: Who is Ed Sheeran?<br>
  <strong>(leave the extracting part to me, I know how to do that)</strong></p>
  
  <p>In the background, the program searches Wikipedia pages for Ed Sheeran, and extracts the first few sentences about him. And then, it extracts information and print it back.</p>
  
  <p>So, after the program is made, this will be my output:<br><br>
  User input: Who is Ed Sheeran?<br>
  Output: Edward Christopher "Ed" Sheeran (born 17 February 1991) is an English singer-songwriter and occasional actor.<br></p>
  
  <p>User input: Where is Bangalore?<br>
  Output: Bangalore /bæŋɡəˈlɔːr/, officially known as Bengaluru ([ˈbeŋɡəɭuːɾu]), is the capital of the Indian state of Karnataka.</p>
  
  <p>All help will be appreciated. Thanks!</p>