0
votes
3answers
73 views

Comparators sorting

I'm not good with comparators but I need to learn it, I've done this much so far but I keep getting error at 'System.out.println(compy("January", "March", "October", "April"));'... please help, I ...
-2
votes
5answers
62 views

Splitting string into serveral different strings

I am getting the source code from a site and putting the code into a string, the will look like this: 501252,110,34496 331550,30,14114 403186,1,18 325033,31,15750 460287,14,2384 286659,11,1366 ...
0
votes
5answers
176 views

Rewriting parts of a string

I have a string I would like to rewrite. The string contains substrings that look like "DDT" plus four digits. I'll call these blocks. It also contains connectives like "&" and "|", where | ...
0
votes
1answer
53 views

The type of expression must be an array type but it is resolved to a string?

I'm trying to integrate a "Next" button in my jokes app. I'm getting the error on textView.setText(message[currentSelectedJoke]); I KNOW this error means that "message" is a string but it ...
1
vote
2answers
76 views

parsing String as Code

I have got a list of constants in a class like: public class constants{ public String avg_label ="......"; public String count_label="......"; } While calling , is it possible to do ...
-5
votes
2answers
49 views

Removing garbage words from a string - Java [on hold]

I am working on a project where i need to remove meaningless words from a given input string. This to be done essentially over movie titles. Example for Input - "Argo 2012 Bluray x264 YIFY" the ...
1
vote
0answers
23 views

Java String- Font style check

I need to do font style check for my selected text area. I used applescript to copy my highlighted/selected text area to clipboard and retrieve the clipboard value in java. I used string to capture ...
5
votes
2answers
202 views

Convert a string from Java to C++

I have this string in Java: String op="text1 "+z+" text2"+j+" text3"+i+" "+Arrays.toString(vol); where "z", "j" and "i" are int variables; "toString()" is a function belongs to a class. class Nod ...
-1
votes
4answers
84 views

What is the advantage of regular expression? [on hold]

The regular Expression of code String inputOne = "cat cat cat cattie cat"; String findStr = "cat"; Pattern p = Pattern.compile("cat"); Matcher m = p.matcher(inputOne); int ...
0
votes
0answers
44 views

Android: Open alertdialog from part of string?

I have a CheckBox with a string that says "I have read and understood the terms and conditions". Now I want to make the words "terms and conditions" to a link which opens a alertdialog where the terms ...
0
votes
1answer
18 views

Stripslashes in Android/Java

I've a webservice running and Android devices reading data from it. The data I want to send, is slashed by the server, to avoid hacking issues. Once its escapped, it's being saved into the database. ...
0
votes
5answers
72 views

Getting null pointer exception while inserting into two dimensional array of Strings

I have file named input1.txt with contents as below: a b c d b d c d d e I want to read it and put them in 2-dimensional array of Strings. I have written code for it. But it is showing NULL ...
1
vote
4answers
66 views

Remove multiple substrings from a string - Java

I need to remove multiple substrings from a given String. Example - String[] exclude = {"one","two","three"}; String input = "if we add one and two we get three" I want my program to remove all ...
2
votes
8answers
114 views

Return two Strings from method

I'm a beginner in Java programming, and I'm trying to make a voting machine program, where you can vote for Republicans or Democrats. My question is, how can I edit my method so I would be able to ...
0
votes
2answers
32 views

how to convert char to string

I have a word as string that want to take a character of it and assign it as the button name. As you know button only accepts String. String possibleLetters = "asdaAsadWERWasdas"; for (int i ...

1 2 3 4 5 524
15 30 50 per page