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. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |