Questions tagged as 'java'

1
answer

How to add AsyncTask to this task?

Hello, could anyone help me add an AsyncTask to this task? Here I am connecting to a JSON for information, then it will be added to RecyclerView. RequestQueue queue = Volley.newRequestQueue(this); String shhik = "http://meusite/arquivo...
asked by 05.10.2016 / 21:36
1
answer

ArrayIndexOutOfBoundsException error while executing code

My code is giving the following error:    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10 at t151.main (t151.java:19) What does this mean and how do I fix it? Follow the code: public class t151 {...
asked by 03.11.2016 / 23:36
1
answer

Variable access within inner class

I'm new to programming android / java and then this error came up. public class Activity_2 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R...
asked by 04.11.2016 / 11:58
1
answer

How to use a selection setback in custom renderer?

I'm trying to use a cell render, so when I display monetary data, it does formatting. However, when I apply rendering to a particular column, the focus in that column does not have the background of the rest of the row. To solve this, I thoug...
asked by 05.11.2016 / 15:36
2
answers

Converts String to Arduino int in C

Good people, I'll try to explain my problem. I am developing a small software in NetBeans that communicates with Arduino via Serial Port. My problem is that in NetBeans I'm sending String, and I need to convert this String to integer and I'm...
asked by 03.11.2016 / 04:23
2
answers

How to make a button or a checkbox become inaccessible in android studio?

I would like to confirm the choices of both the buttons and the checkboxes, so that they become inaccessible / irresponsible / inactive. I know you can do this using if, but I think there should be some function that makes them "inaccessible....
asked by 22.03.2017 / 00:20
1
answer

How to set the key and value of an object by creating an instance and putting the values in the map?

I only know how to do the hashmap in a way that is creating an instance in the put method to do insertion of values. Here's how I can do it: import java.util.Map; public class Teste { public static void main(String[] args){ //Exemplo com...
asked by 28.06.2016 / 15:03
3
answers

Consume web service HTTPS

I'm trying to consume the CEP webservice    link I'm using Java Web - JSF with WildfFly10 For this I am using the following code. String URL_WEBSERVICECEP = "https://viacep.com.br/ws/[CEP]/json/"; String urlCep = URL_WEBSERVICECEP....
asked by 23.06.2016 / 21:23
1
answer

Change variable of another class

I have two activity / classes, follow the button of my first activity where when I click go to the second activity: public void onButtonClick(View v){ if(v.getId() == R.id.Busuarios){ Intent i = new Intent(Velocimetro.this,Usua...
asked by 19.06.2016 / 00:14
1
answer

Get a class that has a certain interface implemented in generics [closed]

Hello. I want to do something like metodo(Class<? extends ClasseAbstrata> classe) , except that an abstract class, I want to use a interface , but if I change from extends to implements eclipse starts to point...
asked by 24.06.2016 / 23:51