Posts

Showing posts from April, 2021

Common Java Practice Problems

java.net.URISyntaxException: Illegal character in path at index 49  with Illegal Character in Path when i am going to call Rest API using Java 11 HttpClient.   Mostly the reason of this error is url contains empty space (" "). in my case  url="http://localhost:8080/api/customers/byname"+name;  Some reason when i get to call Get Api from my java class which is as follows  public static HttpResponse callRestApiGet(String url) {        t ry {                   request =HttpRequest.newBuilder(URI.create(url)) .                               header("Content-Type", "application/json") .                               GET().build();            response = null;             response = client.send(request,                                                             HttpResponse.BodyHandlers.ofString());            } catch (IOException | InterruptedException e)            {                 e.printStackTrace();                 return null;        

Getting Started With Object Oriented Programming in Java

Image
  Introduction to Object Oriented Programming   To build today’s complex software it is not just enough to put together a sequence of programming statements. We need to use sound construction techniques and program structure that are easy comprehend, implement and modify in a wide verity of situations.           With the advent of language such as C, structures programming become very popular was the paradigm of the 1980s. However, as the programmes grew larger, even the stricter approach failed to show the desired result in term of bug-free, easy-to-maintain, and reusable programs.        To overcome these problems the Object Oriented Programming came in to picture. It is a new way of organizing and developing programs and has nothing to do with any particular language. However, not all languages are suitable to implement the Object Oriented Programming concepts easily. Language that support OOP(Object Oriented Programming) features includes SmallTalk, Objective C, C++, Ada