Questions tagged as 'java'

3
answers

Increasing the size of a TextView, according to the amount of data inserted in it

I'm developing an app, for technical course work, and I have the following situation: I'm displaying data within a TextView . But there comes a time when size is not enough. Look at the pictures. App Home Photo: PhotoActivityReport,wh...
asked by 22.09.2015 / 03:17
2
answers

JSONArray in JSONObject: Json.typeMistach error

In a web-based search I discovered that the Json.typeMistach error was due to me getting a JSONArray and trying to get it in a JSONObject . I can not fix it, the error persists. Could someone give me a hand or point me to a tu...
asked by 10.09.2015 / 04:24
2
answers

With feature in Java

Hi, some time ago I discovered that some programming languages have a feature called with . For example:  In JS But in Java I do not know anything like that, does anyone know?     
asked by 23.10.2015 / 02:56
3
answers

How to make a rectangle of asterisks using for?

To resolve this exercise:    Write a program that prints a rectangle of n x m asterisks in the   which values of n and m are supplied by the user. For example,   for values of n = 5 and m = 7, the expected result is:       ******* -   *****...
asked by 27.05.2017 / 21:39
2
answers

How is the java project separation?

Well, I come from .NET and there we have projects that we can divide into class library and web project I have my project just for my models Another only utils project and my web-only project In Java how is this separation made? I tried lo...
asked by 03.04.2014 / 14:05
2
answers

Maven how to set the JDK version?

Problem: When I create a project maven the project always had the version JDK 1.5 , if I change the JDK version in the IDE when doing a Maven > Project Update it returns to JDK 1.5 . Is the setting.xml...
asked by 18.02.2014 / 20:54
3
answers

How to use repeated methods?

I have some methods that I use at various points of the applications and I end up having to copy in each class. For example: String getStringOrEmpty(EditText editText) { String mString = editText.getText().toString(); mString = (mSt...
asked by 02.02.2017 / 03:31
1
answer

Scrolling Dates using Calendar

I'm making a report on java , which passes a period specified by the user. In my%% of% I'm doing the treatment. Here I pick up the date passed. String data1 = DateUtil.toString(dto.getDataInicio(), "MM/yyyy"); String data2 =...
asked by 01.02.2017 / 13:10
2
answers

Analysis of sound waves from an MP3 file and representation

Is there any way in Java / Android to open an MP3 or WAV file and from there get the sound waves constantly? according to its reproduction? and can from that constant return make your graphical representation? Example 1: Videowiththedesiredo...
asked by 11.02.2017 / 16:40
2
answers

Calculation Water consumption in Java using IDE Eclipse

I'm having trouble writing this exercise in the Java Language, using the Eclipse IDE:    The director of a state school in the city of São Paulo is terrified of the absurd consumption of water that is occurring monthly. In order to gather inf...
asked by 16.03.2018 / 12:38