![]() For example, let us say the array is arr =. It is given that each element in the array is unique. You are given a sorted array of integers. You have to check whether they are anagrams or not. The addition should be performed as per the rules of binary addition. Add two Binary Strings and return a Binary String as a result. A sentence is said to be a palindrome if we convert all its alphabets to lowercase, include the numerics but exclude all the spaces, whitespaces, and other special characters and it reads the same from left to right and right to left. Java Programming Interview Questions for Experienced.Write a program to show a single thread in Java. Write a program in Java to show a basic “divide by 0 exception”. Write a program in Java to show inheritance in Java. Give some properties and methods to it and show how you will access them in the main method by creating object(s) of this class. (The matrix can have different numbers of rows and columns). Write a program in Java to print the elements of the matrix in Wave Order as shown below. Write a program in Java to input an NxN matrix and display it row-wise and column-wise. Write a program to find the index of first occurrence and last occurrence of an element in the array in a single iteration. Write a program in Java to Reverse an Array without using extra space. Write a program in Java to prove that the strings are immutable in Java. ![]() The character ‘b’ repeats twice and so it will not be printed. For instance, if the input string is “abcb”, the output will be the characters ‘a’ and ‘c’ as they are unique. Write a program to print all the unique characters in a String. However, only the lowercase English alphabets are allowed in the String. The string can contain all the alphanumeric and other special characters as well. Write a program in Java to count the total number of vowels and consonants in a String. For instance, if the input string is “ApPLe”, the output should be “aPplE”. ![]() Write a program in Java to Toggle the case of every character of a string. You cannot use any extra space apart from the recursion call stack space. The expected time complexity is O(log2N) where N is the power. Write a program in Java to calculate pow(x,n) using recursion. You can use O(N) time but can’t use any extra space apart from the Recursion Call Stack Space. Write a Java Program to calculate xn (x to the power n) using Recursion. You have to take N and D as inputs from the user. Write a program in Java to calculate the number of times a digit ‘D’ appears in a number N. Write a program in Java to count the digits in a number. Write a program in Java to generate the Nth Fibonacci Number using Iteration and Constant Space. Java Programming Interview Questions for Freshers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |