Skip to content

Tag: java

Java .split method returning empty array

I am trying to count all the words in each sentence in an array of multiple sentences automatically from a file in eclipse. When I’m splitting the paragraph into sentences the java .split method is returning an empty array Here is the code that is causing me trouble here is my sentence class And finally…

Java Base64 encoding loss of data

say I have the following snippet, where certificate is a java Certificate object: Is there any chance data will not be equal to newData? basically, is there loss of information to string and then back? Thanks Answer Assuming nothing explodes due to out-of-memory errors or similar general problems, this code s…

Java config file multidimensional array

I have a problem. For my code I have a config file with the following content: To read this config file, I have the following code: But now I need to change the format of the names to: The output varialbe has to be of the type: String[][] with as result: What is the best way to achieve this? Answer

LibreOffice SDK read formula result

I am using the LibreOffice SDK to create a Java program that reads data from a Calc spreadsheet. One of the cells has a formula in it that returns text (i.e. not a numeric/double value). XCell.getFormula() returns the actual formula (“=I6”), rather than the result (“my text”). I have l…