Posts

Showing posts from February, 2019

Pattern based programs in java

Write a program to print a  right angle triangle using single loop . package com.myconceptonjava.practice; public class PrintRightAngleTriangle {     public static void main(String[] args) {         int j=0;         for(int i=1; i<5 ;){                     if(j<i){                 System.out.printf(++j +" ");                 continue;             }             else {             System.out.println();             j=0;                 i++;       ...

RESTful Web Service Interview Question

1. What REST stands for? Ans:- REST stands for REpresentational State Transfer. 2. What is REST? Ans:-REST is web standards based architecture and uses HTTP Protocol for data communication. It revolves around resource where every component is a resource and a resource is accessed by a common interface using HTTP standard methods. REST was first introduced by Roy Fielding in 2000. In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources. Here each resource is identified by URIs/ global IDs. REST uses various representations to represent a resource like text, JSON and XML. Now a days JSON is the most popular format being used in web services. 3. Name some of the commonly used HTTP methods used in REST based architecture? Ans:- Following well known HTTP methods are commonly used in REST based architecture −     GET − Provides a read only access to a resource.     PUT − Used to create a ...