Jan 11

Write a java program to Create a new file using file.separator in java

File.separator is used to obtain the local computer’s proper separator character instead of explicitly using / or . For example On a Windows computer, the separator character is a backslash ().
On a Linux or Mac OS X system, it’s a forward slash (/).
File.separator is a String consisting of one character—the proper separator for the system. Continue reading

Jan 04

Top 20 string coding interview questions in java?

String coding interview questions in java

1)      Write a java program to reverse string in java without using reverse() method of string api?

2)      Write a program to check if a string is palindrome or not?

3)      Write a program to count number of occurrences of characters in String in java?

4)      How to split strings in java?

5)      How to convert string to date in java?

6)      How to convert String to int in java? Continue reading