-6
votes
0answers
19 views

Printing initials of a user input name with full surname in Java. [closed]

I am a beginner in Java and have been given this assignment of getting user input of a name with Buffered Reader and print its initials in capital along with the full last name.I have to get this ...
-3
votes
0answers
23 views

Finding the no. of 3 consecutive 1's in a sequence [closed]

I am writing a program which needs to calculate the no. of 3 consecutive 1's from the given binary sequence of zeroes and ones in java! Kindly help me out.. Thanks
-2
votes
4answers
44 views

Get First Word from a Text/String Using Java

I have an array that contain: Book http://amazon.com/index.php Manga http://mangareader.net Tutorial http://stackoverflow.com I want to get the first word, so the result that I want is: Book Manga ...
0
votes
1answer
29 views

HTTP Request passing Keywords to search

I made some research to solve my problem but sadly until now I couldn't. It's not such a big deal but I've stuck on it.. I need to make a search with some keywords in search engines such as google. I ...
1
vote
6answers
63 views

convert String to int to get a unique number

hi i am trying to convert a sting such as "abc-d1_23QWEwer" to an int number StringBuilder sb = new StringBuilder(); int intServiceName = 0; String stringServiceValue; for (int i = 0; i < ...
-3
votes
0answers
45 views

How do you find a word inside a string without using the string methods? [closed]

I have been trying all night long on doing this but to no avail. It's hard when your used to using the string methods. The reason I wanted to code this is to improve myself coding wise.
0
votes
3answers
58 views

java trouble with replace and replaceAll with slash

I am trying to change a string with a date, for example "06/20/2013", to "06202013" (just taking out the slashes). I have looked up all the posts about replace and replaceAll and played around with it ...
0
votes
6answers
70 views

Replace case insenstive in string

I have a file and i converted that file into string. Now whenever i am trying to replace some camelcase data like 'fooBar' with lowercase data like 'foobar' then it is not working. I tried these 2 ...
0
votes
1answer
78 views

Efficient string reading in Java?

I am receiving a packet such as "c~ ¹" M:0013A20040559361 Ax:48 Ay:10 Az:1012 Tp:25 B:45 ? Tm:Wednesday, 02/01/13 - 16:16.57 Sº~" and others characters which could not be pasted. I have to read the ...
1
vote
3answers
29 views

Using try-catch to catch string input of fractions from JTextField in Java

I have the string input from a JTextField, It will have to be a fractional input with numbers, separated by a single '/'. I need to throw an error when a user inputs a string incorrectly; so far I ...
1
vote
1answer
38 views

Why isn't my string being displayed in the window?

I am trying to create a simple application that shows a red circle that when clicked displays different messages under it. I believe that this part of the code: g.drawString("DO NOT PRESS", 100, ...
5
votes
3answers
92 views

Algorithm and Data Structure for Checking letters in a word with another set of letters

I have a dictionary of 200,000 words and a set of letters. I need an algorithm to check if all the letters of a word are in that set of letters. It's very slow to check the words one by one. Because ...
1
vote
2answers
63 views

I need to extract numbers from a String in Java

In my program, I need to extract numbers from a String the given string is the following. String numberOfHours = "12.0 8.0 7.0 7.0 10.0 8.0 0.0 2.0"; I need to extract each value into an ...
0
votes
2answers
64 views

Combining array indexes

I have created two arrays. One to store names and one to store sales. I am trying to link the indexes of each together so that index 1 from then name array will bring up the value of index 1 of the ...
0
votes
4answers
46 views

Java string.replace(old, new) count how many replaced?

I have my console (image down below), and I have a command that will replace all oldstinrg to newstring. But how do I count how many of those were replaced? (If the code replaced only once a to b ...

1 2 3 4 5 494
15 30 50 per page