Java Developer Interview Answers for Rajitha Nellepalli
(Previous content retained...)
---
Programming Interview Questions & Answers
Basic to Intermediate Programming
1. Reverse a String in Java without using built-in functions:
public String reverse(String input) {
String result = "";
for (int i = [Link]() - 1; i >= 0; i--) {
result += [Link](i);
return result;
2. Check if a number is a palindrome:
public boolean isPalindrome(int num) {
int original = num, reverse = 0;
while (num > 0) {
reverse = reverse * 10 + num % 10;
num /= 10;
}
return original == reverse;
... (Truncated here for clarity, actual content will be fully added in script)