Questions tagged as 'java'

1
answer

How do I retrieve a result from within the "onActivityResult" in my activity

I'm trying to use my cell phone camera as a bar code reader. I can recover the bar code, and see the result within the "onActivityResult", however, I need to get the result I got, for my main function, and I'm not getting it. Follow the co...
asked by 23.03.2018 / 17:20
1
answer

Create objects after external server response via API

It is the following, I created an API in php that generates a Json. LINK is this for anyone who wants to view. I was able to access the link and retrieve the information, as I used a Toast to show them. But for some reason, which I do not k...
asked by 15.03.2018 / 21:38
1
answer

Mirroring Apache Tomcat - Work

Explanation: Currently when we update our client's project it is "out of breath" during this update, the idea is to be able to update the project without stopping the client, I saw something related to tomcat WORK but nothing very explanatory, s...
asked by 08.05.2018 / 15:31
1
answer

Read an even number

I'm once again in doubt, now the doubt is related to exercise over Desvio de condicional Simples using only the command IF    After reading an integer value, compute and display your square only if the read value is even. Other...
asked by 07.05.2018 / 22:27
1
answer

Change the color of the JTable header

How do I change the header color of JTable that uses Nimbus Look And Fell ? I tried to use: JTableHeader header = jTable2.getTableHeader(); header.setBackground(java.awt.Color.yellow); But it did not work, it continues with the d...
asked by 08.05.2018 / 03:47
1
answer

Doubt with scanner

I wanted help with a program that would ask the person whose city it is. If you enter a city other than the one programmed, the program would say that the person could not proceed (I intend to use If for this). Scanner teste = new Scanner(Syst...
asked by 02.04.2018 / 04:48
1
answer

Connection error when using Hibernate logs

I'm trying to see the sqls generated by Hibernate in my JAVA application but I'm having problems because adding the two commands below throws some exceptions. Commands I'm inserting in persistence.xml: <property name="hibernate.show_sq...
asked by 09.03.2018 / 14:55
1
answer

Classes Parametrizadas with JUnit 4

I have an exercise to solve involving classes parameterized in Java and I'm a bit confused. The exercise is as follows:    Program a parameterized class to   test the areaA square method with the following   input and output values: {b:0...
asked by 08.03.2018 / 03:00
2
answers

Long Swap for BigInteger or BigDecimal?

I'm trying to read from the keyboard a very large integer, I saw that there are BigInteger or Bigdecimal types, I do not know if they are larger than Long. I wanted to read from the keyboard numbers with 10 or 14 digits but Long is not suppor...
asked by 12.06.2016 / 00:54
2
answers

How to enable and disable an input of type text after a selected value in the combobox

My jQuery < script > $(document).ready(function() { var tipo = $("#idTipoParticipante option:selected").text(); if (tipo == 'Personagem') { $("#enable").click(function() { // habilitando...
asked by 08.06.2016 / 11:01