Questions tagged as 'java'

1
answer

How to construct a json answer using Gson

First of all, I agree that the question was a bit strange, but I can not write my question any other way. At the end of the explanation of the problem if someone wants to suggest a better title that expresses the problem better, I will be gratef...
asked by 22.09.2018 / 16:43
1
answer

How to create a TextView and ImageView via code?

I would like to know how to create a code TextView and ImageView and destroy it via code.     
asked by 20.02.2016 / 14:20
1
answer

How to retrieve index of combobox from a string?

I have the String for a combobox item, but when the user clicks the table, the combobox must automatically select the category of that certain item. However, I came across that there is no getIndex function as I put below. How can I retrieve the...
asked by 12.10.2017 / 21:12
1
answer

How to click the ListView item and call another screen?

I created a listView where it shows my registered item, how do I to click the item I want it to open a new screen with the description and details of the item? Class where my table is displayed: public class MostraTodosOsLivrosActivity exte...
asked by 08.05.2015 / 16:44
1
answer

How to understand the error message?

How do you understand this error message? mai 20, 2015 8:25:59 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute ADVERTÊNCIA: /pages/produtoCadastro.xhtml @80,49 actionListener="#{fileuploadBean.upload}": java.lang.NullPointerException...
asked by 21.05.2015 / 01:27
1
answer

What is & quot in Java?

I would like to know what & quot means in java. Example: used to form the name of an object: ClasseObjeto celula+""+col+"_"+lin = new ClasseObjeto();     
asked by 23.10.2017 / 22:34
2
answers

Where to store profile images that the user uploaded?

I have a JAVA application that needs to store profile images that the user uploaded. //no meu LOCALHOST eu uso esse caminho e funciona perfeitamente: File arquivo = novo File("C:/myProject/uploads/profile_images"); So now I want to deploy t...
asked by 17.10.2017 / 18:59
2
answers

Error in comparing strings

I need to do a program where the program receives a phrase and then a letter, and then return how many times the letter appears in the sentence. So I did this: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStre...
asked by 07.09.2018 / 20:15
2
answers

Substring Program

I have a C program that displays all the substrings of a String: #include <stdio.h> #include <stdlib.h> #include <string.h> typedef char string[100]; void substrings(string str) { if (strlen(str) >= 1) { puts...
asked by 17.08.2018 / 22:33
2
answers

Application does not save data and only saves code

I'm developing software for an MVC (model-view-controller) design video store and the problem of not saving people is occurring. It only saves the code of the people and I do not even know why it is happening not to save the clients because my s...
asked by 22.10.2015 / 19:01