Questions tagged as 'java'

3
answers

Is it possible to develop mobile cross-platform using Java?

I'm migrating the development of my Java applications to build native apps for Android. I would like to expand my applications to other platforms, such as iOS and Windows Phone. Is it possible to do this with Java ?     
asked by 13.01.2016 / 18:07
2
answers

Doubt in a Java exercise [closed]

I was looking for some Java exercises to train and learn some algorithms when I came across the site exercism.io and I decided to do their exercises in Java. So far so good, I downloaded their app using chocolately and installed the gradle...
asked by 17.01.2016 / 23:08
1
answer

Convert a String ArrayList to a Json

I need to convert a ArrayList of String to a JSON. I have a method where I get a list of apps installed on the mobile device. This method returns the data in a String ArrayList. I was able to generate a JSON using JSONArra...
asked by 26.01.2016 / 21:22
2
answers

What is JPA's mappedBy for?

Example: @OneToMany(mappedBy = "chemical", fetch = FetchType.LAZY) @LazyCollection(LazyCollectionOption.EXTRA) @JsonIgnore private List<SimulationChemicals> simulationChemicals; Why is the use of mappedBy mandatory or important? I...
asked by 08.01.2016 / 18:23
1
answer

How to make RegEx for a "serial" number format?

How to do RegExp in the following format: 2015.1.123.5432 Does anyone have any ideas?     
asked by 07.08.2015 / 00:18
1
answer

How do I make my own commands and shortcuts in Eclipse?

What I mean by my question is that, for example, when I use sysout and Ctrl + Space the System.out.println(); method line is ready for me use, reducing my time to type everything. I would like to know if you can do my own co...
asked by 04.08.2015 / 14:24
3
answers

How to check if String is null or blank in Java / Android

I went through this problem by implementing a simple database query library sqlite in android and would like to share the solution with community, I think it's useful as I've thought through until I find a simple solution.    In the imple...
asked by 27.03.2014 / 01:06
2
answers

How to get the current date / time, regardless of the device?

Well, I know that when you create an object of type Date: new Date() , the device's time and date is returned, so if I get into settings and change these values, then the time returned will be different from the universal time or local, co...
asked by 05.05.2016 / 21:50
2
answers

Larger and smaller number

I need to sort three numbers and I can not use for or vectors. I know it's easy but I can not do it. My problem is: I can not save the highest value. public static void main(String[] args) { Scanner sc = new Scanner(System....
asked by 29.01.2016 / 17:31
1
answer

Split by character | does not return all expected elements

I have a file with similar lines as the following: 42|a|b|c|d||f||h||||||||||||||||||| I need to split by character | so my code does as follows: String linha42 = "42|a|b|c|d||f||h|||||||||||||||||||"; String[] campos = linha42.split(Patt...
asked by 02.03.2016 / 21:58