Questions tagged as 'java'

1
answer

Fill / give value cell Google SpreadSheet

I tell you my problem: I'm trying to give values to the different cells of a spreadsheet of Google from Java . Currently what I do is instantiate an object of the class CellEntry to which I indicate the text and the concre...
asked by 11.07.2016 / 19:54
3
answers

Why recursion is not efficient?

I need the factorial of 100, I realize that I need to look for another alternative, could you help? public class Main { public static void main(String[] args) { System.out.println(factorial(100)); } public static l...
asked by 12.08.2017 / 03:28
2
answers

Error building Gradle Android Studio 1.5.1 (Error: Execution failed for task ': app: dexDebug'.)

I have the following error when trying to build my application, Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program File...
asked by 08.01.2016 / 00:18
2
answers

How to play an audio mp3 and others in Java

Hi, I've been looking to play an mp3 audio but it still does not work. I tried with the JavaFx Media class. How could I play the audio? without having to resort to external libraries.     
asked by 03.05.2016 / 00:23
2
answers

How do I avoid the line breaks when I enter a number?

When I choose any option, it asks me to enter a number, but that's when that number goes down and does not follow. For example: Introduzca un numero: '1 I want that number to appear there and what happens is: Introduzca un numero: (no lo...
asked by 07.12.2016 / 00:53
3
answers

URI is not hierarchical (JAVA)

I'm having a very uncomfortable problem. Generate a test JAR executable file, and it is generating the following error: Exception en thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: URI is not hierarchical at java.io.File.<...
asked by 27.01.2017 / 20:37
2
answers

Differences between .map and .flatMap?

I am working with Streams (Java 8) and when I use the .stream() method it is not clear to me the difference between .map and .flatMap . What are the differences between these methods?     
asked by 04.04.2016 / 13:41
4
answers

Extract a date from a string in Java

I'm trying to extract the date from a string that can come in different formats such as: Cod. principal: 785369-06 Fecha 14/10/2015 And even things after the date, such as: Fecha 2015-11-24 asddsa12 Otros datos: 12202 How could I do to...
asked by 05.01.2017 / 01:20
2
answers

Send mail via Gmail from Java

This module sends mail only authenticated in Hotmail, how do I authenticate in the same way in Gmail and Yahoo? ..... Try adding the line: props.setProperty ("mail.smtp.host", "smtp. gmail.com "), but does not authenticate via Gmail. Propertie...
asked by 31.01.2017 / 14:49
3
answers

'getMonth ()' is deprecated

I am getting the current month as follows: int mesActual = new Date().getMonth() +1; //enero=0 diciembre=11 But this method is obsolete. How do I replace it?     
asked by 15.12.2016 / 18:57