Question d’entretien chez Radiant Systems

1) check given string is palindrome or not String=MADAM 2)Print below pattern * ** *** **** ***** 3)write a program to encapsulation abstraction and polymorphism 4) write servlet program to name, age, company add and display when click add all records store in the list and when click display button it should display all records note view should be in jsp only

Réponse à la question d'entretien

Utilisateur anonyme

14 sept. 2017

1)public class Palindr{ public static void main(String[] args) { String str="MADAM"; String revstring=""; for(int i=str.length()-1;i>=0;--i){ revstring +=str.charAt(i); } System.out.println(revstring); if(revstring.equalsIgnoreCase(str)){ System.out.println("The string is Palindrome"); } else{ System.out.println("Not Palindrome"); } } } 2)public class Pattern { public static void main(String args[]) { int i, j; for(i=0; i<5; i++) { for(j=0; j<=i; j++) { System.out.print("* "); } System.out.println(); } } } 3) dont know 4) dont know