HTML

Top 21 String Programming and Coding Interview Questions With Solutions

In this article, I am going to share 21 of the most common String-based Programming and Coding interview questions from Java developer interviews. These questions require you to write code to solve the problem and they are different from traditional Java String questions like how substring method works in Java or when to use the intern() method of String in Java? Since coding and problem solving are an important part of any programming job interview, it's imperative that you know how to solve them in time and on a pressure situation, which comes only after doing practice with the right set of questions. Since these questions are already tried and tested and appeared in many interviews, they will provide you the experience you need to crack your coding interview.

Difference between GET and POST Request in HTTP/REST

HTTP Protocol supports many methods to retrieve data from the server or perform any operation on the server, like upload data, delete the file, etc. In total, the HTTP protocol supports the following methods, like GET, POST, PUT, DELETE, HEAD, DELETE, OPTIONS, and TRACE, and HTTP 1.1 reserves technique called CONNECT for future use.  GET, and POST is two of the most common HTTP methods you would hear or work on the web. Though both can be used to send and receive data from client to server, there are some crucial differences between the GET and POST in HTTP, which will help you to understand when you should use GET vs. POST while writing your client and server application.

3 ways to find a duplicate number in given array in Java

Problem: You have given an int array that contains duplicate or repeating elements like numbers. You need to find all those repeating numbers from a given array. Remember, the array may contain 1, 2, or multiple duplicates. You need to print all of them. For example, if the given array is {1, 2, 3, 4, 5, 6, 1} then your program should print 1. Similarly, if the given array is {3, 3, 2, 2, 4} then your solution should return 2 and 3, the order is not important as long as you can identify all the repeating elements.

How to Implement a Power Function in Java - Coding Interview Question

Even though the Java library has a power function, Math.pow(), to calculate the power of a given number in Java, it's a regular programming exercise for Java programmers to implement a power function. If you have used the Math class, then you know that the java.lang.Math.pow(double a, double b) returns the value of the first number raised to the power of the second number and you need to do the same. In other words, you need to write a Java function to calculate the power of integer numbers for simplicity. The original method accepts a binary value, but you are allowed to use just integer, but beware that power function may overflow.

13 Free Java 8 Certification Sample Questions - OCAJP8 and OCPJP8 - 1Z0-808 and 1Z09 dumps

Hello guys, Java SE 11 certifications are already out but not many people are going for it because of difficulty level. If you want to become a certified Java developer then Java SE 8 is still the best possible option. If you are preparing for Oracle Java SE 8 Certifications, like OCAJP8 and OCJP8, also known as exam 1Z0-808 and 1Z0-809 and looking for some free practice tests, then you have come to the right place. In this article, I am going to share some of the best OCAJP 8 and OCPJP 8 mock tests available for free of cost online, so that you can check your speed and accuracy before the real exam. These tests are not just useful for Oracle's Java OCA and OCP certification but also for upgrade exams like OCJP 8 upgrade exams with code 1Z0-810 and 1Z0-813, upgrade to Java SE 8 from Java 6 and prior version.