Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a text file like below
Shipto: abc def Soldto: XYZ EFG From: JANGO
Shipto addr Soldto addr FromAddr
PO - 1000 PO-2000 PO-3000
I need to parse this file and store the ship to, sold to and from addresses to DB using Java. Any idea how to achieve this?
Try using a scanner to read the txt file and store it in a String. You could then parse the String and store it in a DB.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want data to be extracted based on user input. Program asks for date input from user and based on that input all the records having that date should be fetched. How to do that?
CSV files are just comma separated files. So you can read the csv file like any other file using the Reader class and then use the split function to seperate the columns.
First, you can read the file and store it in 2-D string array. And then filter the records according to the user input.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have been working on a java algorithm and I want to improve it by allowing it to accept and process very large String values.
Could you suggest me any good ways of storing the input/output results. I've been thinking of writing it on a file with the readLine(), writeLine() methods? Is this a good technique ???
I recommend you to store all your string in a text file (if possible) and use BufferedReader utilities ...
here is the a link to how its done :
https://www.tutorialspoint.com/java/io/bufferedreader_readline.htm
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a string "eur0.99", it can be "eur123.0" or "som0.10", or "0.99usd", or "123.34any" or something like that. How can I simply insert a space between the price and letters without making a huge nasty messy code?
You can use
System.out.println(input.replaceAll("(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])", " "));
Ideone Demo
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
how I can get a field (text area) from my database and read it as a pdf
What do you mean, to retrieve a text value and read it as pdf?
If you read values from a database at the most you can use these values to generate a pdf through a library like PDFBox, IText or GlobalReports
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
In a Text file I need to print only last character Is Possible
Example Input
Steve Jobs
Android
Apple
Core Java
Facebook(Assume Its in file name Sample)
Output
Input
droid
pple
book
Question is not clear. You can get the last charactor by
String str = "awesome";
System.out.println(str.charAt(str.length()-1));
Output
e
You can manipulate this in order to get what you expect.