Questions tagged as 'java'

2
answers

String comparison problem [duplicate]

I need to compare if the name entered in the textField is the same as the "root" user. When comparing even by typing root Eclipse informs you that it is invalid. Unfortunately I do not understand the reason for the error. // ......
asked by 11.06.2018 / 14:01
1
answer

Inserting items into an ArrayList does not work as expected

I need to add an item to the list 9 times, except that when I print, only the 12 , "Oi", "Aline" data appears. What am I doing wrong? package webservice; import java.util.ArrayList; import java.util.List; import javax.ws.rs.GET; imp...
asked by 15.07.2016 / 14:43
2
answers

Refresh datatable after deleting record

After deleting a record in my dataTable, I want it to be reloaded, I can not. Does anyone give a help? <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1...
asked by 13.07.2016 / 03:51
1
answer

How to insert Java code in html?

Hello everyone, I would like to know if it is possible to insert Java code in html, since I am trying to do a Java encryption program myself and put it inside the html. I'm asking here why I have not found anywhere about whether it's possible...
asked by 20.05.2016 / 21:59
1
answer

Problem with methods

I'm doing a program that calculates BMI, using methods without return. Program in question: package pct; import java.util.Scanner; public class Ex02Metodos { public static void main(String[] args) { Scanner teclado = new Scanner(Sy...
asked by 01.05.2017 / 23:26
1
answer

Why is not entering if?

Example: user type 4A6 then in this string the 2nd position is capital. How do I say that the position the user typed is capital? Follow the code to clarify public class JogoMatematica { public static void main(String[]...
asked by 28.03.2017 / 19:26
2
answers

Android application = Unfortunately project has stopped

I'm studying Android and I want to make a simple parameter pass for another Activity but the application is terminated in the emulator and the logCat shows a NullPointerException, can anyone help me? Class: public class MainActivity extends...
asked by 16.06.2015 / 14:48
0
answers

How to configure the Java HttpClient to accept JavaScript and Cookies?

I need to get my HttpClient return to run a JavaScript and load cookies into it, does anyone know how to configure it so that it can be possible? Thankful     
asked by 16.06.2015 / 22:50
1
answer

Can I call a class that does only one controller record?

I have a class from an android application that does only the user registry and called it the UserController. In my view controller makes the communication between view and model, but as the class only makes a registration, I believe that it cou...
asked by 19.07.2018 / 01:29
3
answers

How to make an Array created inside an AsyncTask be global?

In my original version I populated my spinner from an Array, placed in strings.xml And to know which selection the user made, he used the following code code 1 @Override public void onItemSelected(AdapterView<?> arg0, View arg1,...
asked by 31.01.2017 / 09:52