Questions tagged as 'java'

4
answers

Addition and subtraction in a chain

I need to implement the following: Entry (a string): 5+45+100-125+5-10 Exit: = 20 Here the code implemented only for positive numbers: String operacion="10+200+3000"; int tam = operacion.length(); String A[] = new String[1...
asked by 09.12.2016 / 01:36
2
answers

Doubt with the code to add and extract the factorial in Java

I'm starting with the Java programming language and I'm very green, the first exercise already brings me a headache, I have a problem to solve with this code, because I do not know how it really works, I had to add all the numbers from 1 at 100...
asked by 14.10.2016 / 13:21
3
answers

Delete consonants from a java string

I want to delete the consonants of a string, that is, if hello is entered, its output prints or . I have this code, but it does not do it to me import java.util.Scanner; public class vocales { public static void main(String args[]) { Sc...
asked by 22.01.2017 / 12:50
10
answers

How do I get a JSon from AsynTask on android?

This is my function: public class JSONRequest extends AsyncTask <String, Void, JSONObject>{ private JSONCallback activity; public JSONRequest(JSONCallback activity){ this.activity = activity; } @Override protected JSONObject doInB...
asked by 19.10.2016 / 03:42
2
answers

Save images on sqlite android

Hello, I am trying an example to save photos in sqlite, I have managed to show an image of the gallery, but I do not know how to save it. Thanks. //cargar foto en imagenView @Override protected void onActivityResult(int requestCode, int result...
asked by 30.05.2017 / 13:22
1
answer

real-time currency exchange from MXN to USD online store to show prices

I have an online store and the prices of each product are shown in dollars and one side will show an "approx" in Mexican pesos as what aliexpress does, or failing to know if to handle these currency changes depending of the language that is sele...
asked by 25.07.2016 / 08:21
1
answer

Adapt Java desktop application to any screen

Good morning, I am developing a very simple desktop app to test touch screens. The thing is that I want an app with 4 buttons that adapt to all screens and that comes out maximized when executed. Something like that The rectang...
asked by 26.10.2016 / 10:23
1
answer

Primefaces: EventBusFactory.getDefault () returns null

I am developing an application with Primefaces that uses the pub / sub model provided by this framework. Technology stack: tomcat 8 java 8 primefaces 6 atmosphere-runtime 2.4.7 In the web.xml file, I define the servlet for Pu...
asked by 13.10.2016 / 16:47
1
answer

Read binary file in C and pass it through JNI to java

Hello, the program that I have works but I know how it is that C can read binary files, supposedly I know that with rb it is reading binary files but in the part of C, a < strong> NewStringUTF , which makes that when you read some special char...
asked by 26.10.2016 / 19:02
1
answer

Recursive method with ArrayList in java

Good morning, I am in the middle of a problem with an exercise of a task. I have a class like this: UML of the class And I have to put together a recursive public method, which returns an ArrayList with the total number of sub sec...
asked by 18.08.2016 / 05:54