Questions tagged as 'java'

1
answer

How to open a dialog box to search for a file on Android? A FileDialog

My question is about opening files in my Android application, such as uploading image from mobile to the server where I first need to choose the image on my phone. I would like to know what I need to use to open a FileDialog , as in C # if...
asked by 03.06.2017 / 04:52
1
answer

Print a List of Objects in Java

When doing a filter of courses belonging to a given shift, the correct one would be to make a foreach by traversing an object, but when doing so it gives an error ';' expected , I did not quite understand why he gave it and when he added the...
asked by 23.03.2017 / 13:03
3
answers

Random numbers in Android Studio

This code is generating random numbers at 6% with% different, but I can not code to prevent these numbers from repeating. package com.example.kelvin.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; imp...
asked by 09.05.2017 / 04:34
1
answer

Modify a LinkedList using another LinkedList

I have a List1 and a List2. List1 is very large and List2 has some elements from List1. To avoid looking for the entire List1 to make a modification and thus lose performance, I need to have a List2 in which I can change the data so that I also...
asked by 08.05.2017 / 20:23
2
answers

Delete in more than one table with a SQL?

I'm trying to apply a DELETE to more than one table, tables have a column (not with the same name) with the same attributes. I want to delete via ID. But I have the table usuario with column id and areausuario with column...
asked by 05.05.2017 / 02:48
1
answer

References lost at the time of persistence

Below are my entities and relationships: Order: @Entity @Table(name = "encomenda") @XmlRootElement(name = "objeto") @XmlAccessorType(XmlAccessType.FIELD) public class Encomenda { @Getter @Setter @Id @GeneratedValue(strategy...
asked by 22.03.2017 / 13:11
1
answer

Load data from a list of a method in the servlet

Good afternoon person! I have this method in the servlet that returns a list of values. How do I load the values it has with jquery? @WebServlet({"/ControleMovEstoque","/template/buscaMaterialExist.html","/template/cadEntradaEstq.html"}) publi...
asked by 31.03.2017 / 21:40
1
answer

Remove n rows from a String

Given a String as a template: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <X-OPNET-Transaction-Trace:X-OPNET-Transaction-Trace xmlns:X-OPNET-Transaction-Trace="http://op...
asked by 17.03.2017 / 13:22
1
answer

Pick up only numbers from a String (Tokenizer)

Hello, I'm doing a project with stack and queue, and I'm in a part that I need to get the operator and put in a stack and the number in a queue. But it's not working this part to get the number, someone has a light to work, because what I used...
asked by 16.03.2017 / 23:51
1
answer

how do I get a value from the textField and pass it to an int variable?

How do I get the value typed in a field of type JTextField and pass to a variable, so I can do calculations later? I tried to use getText() , but the variables because they are int , do not receive the content. I wanted to...
asked by 17.03.2017 / 06:50