Questions tagged as 'java'

1
answer

How to display HTML elements in an Android TextView?

I'm developing an Api that returns some texts, but these texts have tag HTML, be bold <b> or line <P> would like to know how best to print this in TextView , or if I have to sort the text before sending it to th...
asked by 22.03.2017 / 12:29
1
answer

Finding Data in a ListView with ArrayAdapter

I have a listView with JSONTask to fetch from my database everything is Ok. In this listView I have several fields, Card, Tag, Model, Year, etc. I saw some examples on the net but it is for simple search of a single line I tried to put in...
asked by 23.03.2017 / 01:01
1
answer

Inheritance Java Web Inheritance

I have the inheritance to do below and I would like to know how it would look on main. Could someone here help? Could you tell me if you have problems with the mapping I did and what would the mainTest look like? I can not set the value of th...
asked by 22.04.2017 / 17:01
1
answer

How do I define certain values of an array for the same value? (Java)

Example, I have an array of two dimensions of type int: int array[][] = new int[10][10]; How do I set the value of, for example [2] [3], [6] [7] and [1] [9] to some even int, without having to define one at a time like this: array[2][3] =...
asked by 22.04.2017 / 19:06
1
answer

JAVA Attributes Handling

Good afternoon, I have a college job and it's the first semester I'm learning java. The work basically is: Make an interface that would represent any geometric shape, specify area and perimeter methods; Make an abstract class that would...
asked by 11.03.2017 / 20:53
1
answer

Java Array List: How to show a jlist rm the String Array values and Positions

I made this code in the class: public class Dados { ArrayList<Contato> contatos = new ArrayList(); public void cadastraContato(Contato contato){ contatos.add(contato); } public String numeroDeContatos(){ return contatos.siz...
asked by 11.03.2017 / 05:40
1
answer

How to know when a thread has been terminated

I have the following javascript ployment in the call of a Thread . I would like to print in the log the moment the Thread was terminated. It is possible? func4 = { run: function(){ atv4(); } }; r4 =...
asked by 09.03.2017 / 15:37
1
answer

JSON best mapping for Java object [closed]

I need to work with a JSON that has revenue information. This JSON has an object (Recipe) with some object arrays (ingredients, steps). What would be most appropriate, from the point of view of object orientation: create 3 classes - Recipe...
asked by 08.05.2017 / 06:47
1
answer

Strange results when calculating factorial [duplicate]

I can not seem to find the error in my code. When I put numbers smaller or equal to 12 my program gives the right result, but from number 13 the values go out wrong and I can not know why. What is wrong? class vdois { static int fatoria...
asked by 06.05.2017 / 20:42
1
answer

Is it necessary to create a hibernate.cfg.xml to use HibernateStatistics?

I found it nonsense, since hibernate settings are usually allocated in xml persistence. Can you retrieve the sessionfactory only by using the hibernate settings allocated in persistence.xml? or do I need to replicate ORM settings to hibernate...
asked by 28.02.2017 / 22:18