Plz help with third Question 1 Answer(s) 3 years and 3 months ago
Posted in : Java Beginners
1)- Specify and implement a procedure that determines whether or not a string is a palindrome. (A palindrome reads the same backward and forward; an example is "deed.") ----------------------------------------------------------- 2)- Implement a standalone procedure to read in a file containing words and white space and produce a compressed version of the file in an output hie. The compressed version should contain all of the words in the input file and none
View Answers
February 15, 2010 at 4:52 PM
Hi Friend,
1) import java.io.*; class Program{ public static void main(String[] args) throws Exception{ System.out.print("Enter String:"); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String input = reader.readLine(); String st[]=input.split(""); String reversedString=""; for(int i = st.length-1; i >= 0; i--){ reversedString+=st[i]; } if(input.equalsIgnoreCase(reversedString)){ System.out.println("String is Palindrome"); } else{ System.out.println("String is not a Palindrome"); } } }
2) import java.io.*; import java.util.regex.*;
public class Read { public static void main(String[] args) throws Exception {
BufferedReader bf = new BufferedReader(new FileReader("C:\\file.txt")); String line; String data = ""; while ((line = bf.readLine()) != null) { String replacedData = line.replaceAll("[|,|:|/|\\|\'><*}{^();]"," "); System.out.println(replacedData); } } }
Thanks
Related Pages:
Plz help with third Question - Java Beginners Plzhelp with third Question 1)-
Specify and implement a procedure that determines whether or not a string is a palindrome. (A palindrome reads the same backward and forward; an example is "deed
plz help me for this question plzhelp me for this question Apply simplex procedure to solve the L.P.P. maximize z = 3x1 + 4x2 subject to 5x1 + 4x2 â?¤ 200; 3x1 + 5x2 â?¤ 150; 5x1 + 4x2 â?¥ 100; 8x1 + 4x2 â?â?¥ 80, x1 â?¥ 0, x2 â?¥ 0
plz help meto solve this question plzhelp meto solve this question for a file that exist what will be the length() method in the file class return
interview question plz help me and thers
interview questionplzhelp me and thers A college is good if it satisfies the following conditions:
1.Its number of students is greater than 1000.
2.If the name ends wih a character 'e', then it should not start with character
Plz help me with this Question - Java Beginners Plzhelp me with this Question this is java code
-------------------------
Consider the following code:
int [ ] a = [1, 2, 3];
Object o ="123";
String t = "12";
String w = t + "3";
Boolean b = o.equals (a);
Boolean b2
sir i,have a assignment for these question plz help me sir - JavaMail
sir i,have a assignment for these questionplzhelp me sir
1.Design a Java interface for ADT Stack. Develop two different classes that implement this interface, one using array and the other using linked-list. Provide
Plz Help Plz Help Hello Guys!! Plz. Help
I need to write a program to display the astrological sign based on your birthday for example
If we enter the date of birth in the following format from console--13/08/1990
it should give you
plz help plz help what is the procedure and code to design an interactive GUI in java using swings
Question
Question sir I am creating a user defined custom tag in net beans ide but I am unable to run the code sucessfully . I got internal server error plzhelp me
Please visit the following links:
http://www.roseindia.net
help me plz - Java Interview Questions
?
plz answer my question Hi Friend,
Try the following code:
1...help me plz 1)write a java program that prompts the user to input a decimal number and print the number rounded to the nearest integer?
2)write
help again plz sorry - Java Beginners help again plz sorry Thanks for giving me thread code
but i have a question
this code is comletelly right
and i want to make it runs much faster
for that i made 5 threads
but 2 things i dont understand
1- with one
plz Help me find the correct programs answers plzHelp me find the correct programs answers
Create a washing... INDICA" and "TATA NANO" respectively.
Plz mail me your answers...("Enter the Third Subject Mark: ");
value_3 = Integer.parseInt
need the answer vry urgently..plz help me...[plzzzzzzzz
need the answer vry urgently..plzhelp me...[plzzzzzzzz the question... code...hpw to write in eclipse platform....plzplz mail me...to panda.pragnya7@gmail.com/panda_pragnya@yahoo.com...plzplz...help....me..it can change my lyfe
Help me quickly plz?? Help me quickly plz?? Can you help me to write code quickly this code is a java code take input as double and should use command line arguments and enhanced for statement then find the combine of the numbers plzhelp quickly
ArrayList question plz solve it
ArrayList questionplz solve it An arraylist object stores an Emp Object, where there is name,age,address of the employee is stored,
And i want to access the data in the basis of age based?
Provide answer to the question
java coding help plz ?
java coding helpplz ? Given two integers N and M (N � M), output all the prime numbers between N and M inclusive, one per line.
N and M will be positive integers less than or equal to 1,000,000,000.
The difference
Gui plz help
Gui plzhelp Create a Java application that would allow a person to practice math (either addition, subtraction, multiplication or division). The questions must be randomly generated ( the values for each number should
Plz Help Me PlzHelp Me Write a program for traffic light tool to manage time giving between Main-Street and sub-Street. firstly, give green light for 40... traffic light on the frame. We have used java swing. It may help you.
import
plz help - Java Beginners plz help i have to programs and it takes too long to run them so i got a solution that makes programs run much faster which is threading programming..
but i dont know how to aplly that on my 2 programs:
the first code
plz help me find a program plzhelp me find a program plzhelp..i want a source code in jsp for order processing
plz help me any one as fast as u can plzhelp me any one as fast as u can A thief Muthhooswamy planned to escape from **** jail. Muthhooswamy is basically a monkey man and he is able... metres. During his third attempt, Muthooswamy was able to escape from ***
Sample
plz help me - Java Beginners plzhelp me Deepak I can write a sessioon code plzhelp me admin_home.jsp page is display but data is not disply plzhelp me what is wrong
plz help me - Java Beginners plzhelp me Hi,
I want to search all field from database using name, and display in text box, then data is update and delete.
i want to search name using alphabets a-z, plz reply fast.
plzhelp me this is very urgent
Plz give me code for this question Plz give me code for this question Program to find depth of the file in a directory and list all files those are having more number of parent directories
plz Help me - Java Beginners plzHelp me Hi,
I want learn struts,I dont have any idea about this plzhelp how can i make a framework.If u have any information then plz send my personal id
plz tell me that whose software installed.and give me brief
plz help me today plz plz - Java Interview Questions plzhelp me today plz plz 2.) Suppose list is an array of six elements of type int. What is stored in list after the following java code executes?
.
for (i = 0; i < 5; i++)
{
list[i] = 2 * i + 5
plz help me - Java Beginners plzhelp me deepak hw can i create a data grid in jsp and also how can i connect to the data base plzhelp me to create data grid in jsp use html tables with borders.
to connect to data base use scriptlets.
ex
plz help me - Java Beginners plzhelp me Thanks deepak continue response..i face some problem
i hv a these file index.jsp,sessionvalid.jsp, both r store in project folder... is true...but i very confuse that how it is not displayed admin page plz any one
plz help me!!!!!!!! - JSP-Servlet plzhelp me!!!!!!!! i`ve set the environment varaibles for tomcat as well as jdk.. but i`m not understanding where i`ve to save my servlet..i.e.... there are compilation errors.. plz do help me. make sure that you did
help plz - Java Interview Questions
, if the input string is abcd, the output is : edcba
plzplzplzplzplzhelp...help plz 1 )write a program that does the following :
a. prompts the user to input five decimal numbers representing the scores?
b. prints
i need help plz .... Quickly
i need helpplz .... Quickly how can i count how many numbers enterd by the user so the output would be like this
Total number of Scores = ....
this is my code :-
import java.util.Scanner;
public class SCORES
{
public
plz help - Java Interview Questions plz help 1)write a java program that prompts the user to input a decimal number and print the number rounded to the nearest integer?
2)write aprogram that prompts the user to input the five decimal numbers representing scors
help plz - Java Interview Questions helpplz 1 )write a program that does the following :
a. prompts the user to input five decimal numbers representing the scores?
b. prints the five decimal numbers?
c. converts each decimal number to the nearest integer?
d
PLZ Need some help JAVA...HELP !! PLZ Need some help JAVA...HELP !! Create a class names Purchase Each purchase contains an invoice number, amount of sale and amount of sales tax. Include set methods for the invoice number and sale amount. Within the set
question question sir plz tell me what should i give in title box. just i want java program for the question typed in this area
question question sir plz tell me what should i give in title box. just i want java program for the question typed in this area
Plz chk it and reply again - Java Beginners
will be slow also.
so plzhelp me for this if u understood my question then plz...Plz chk it and reply again Hi Deepak,
Thanks for fast reply,your application is good,u write this code for user click the view database
jsp question
jsp question sir plzhelp in design a jsp page which is as follow
username []
select[]
password []
after selection then only password text box is visible
Help me plz in Probablity distribution of Java Help me plz in Probablity distribution of Java Hello,
I have...% is insert or update queries.
Which distribution to use and how to achieve it..
Plzhelp thanks for your time
Intranet Website creation - plz help me
Intranet Website creation - plzhelp me hi..
I have assign with the intranet website creation work..right from scratch to end..And honestly I know nothing about it.My domain is totally different ..
can anybody pls help me
facing problem plz help me out - Framework
Facing problem plzhelp me out hi i am new to servlet i deployed... the web.xml file too parallel to the classes folder now i am facing this problem.plz tell me what to do... error:The requested resource (Servlet servlet
PLZ HELP ME. i need php code. PLZHELP ME. i need php code. I want php code for bellow OUTPUT.
output is just example but it must be letters only.
abc
bcd
efg
jku
rgt
azs
hje
qqc
wws
adt
help me plz befor 27 februry help me plz befor 27 februry what is rung with this ??
help me plzzzz
import java.util.Scanner;
public class Initials
{
public static void main (String [] args)
{
String firstname,lastname
question
question Gud morning sir,
I have asked u some question regarding... then the other one should become optional.This is the problem sir.please help me regarding this promblem.
please help me as soon as possible sir..
Thanks for sending
question
question i need to set trigger using jsp with mysql query,please help me