Questions tagged as 'java'

1
answer

Correct way to check Scala NULL in Java

First, I want to say that I am totally lay in Scala. I know almost nothing beyond the basics of language. Knowing this, let us doubt it. I'm in a project where there are libraries developed in Scala. These libraries were packaged in JAR's and...
asked by 15.07.2015 / 16:01
2
answers

How to add a JAR library in a Java project without IDE? [closed]

Save. I'm having difficulty adding the JFreeChart library to my Java project (I use Windows 8). I have already unzipped JfreeChart, but I do not know what to do from there. As I am an old school programmer and still use Notepad, I could not find...
asked by 28.06.2015 / 00:41
2
answers

Non-static method can not be referenced from static context?

I was watching the programming class in Java and basically the business was calculating the total area of a house with a pool, however, I'm having difficulties. Basically I separated everything into three files, one of them being the main one, b...
asked by 06.02.2016 / 21:47
1
answer

How do I know if SMS failed to send?

I have this method of sending SMS via application: public boolean enviaSMS(String fone, String mensagem) throws Exception { try { smsManager.sendMultipartTextMessage(fone, null, smsManager.divideMessage(mensagem), n...
asked by 10.02.2016 / 14:53
1
answer

How to do POST with parameters in WebService REST in java?

Hello, I have a problem that I can not solve for days. The situation is as follows, until today I was only able to use the GET method of my webservice passing parameters directly to the URL path. But now I need to consume the webservice by pa...
asked by 10.11.2015 / 15:03
1
answer

Error 403 forbidden when consuming webservice CEP

I'm trying to consume a webservice from ceps but it always returns me 403 and it's public. WebService Test Running: link My Controller @Controller @RequestMapping("/busca-cep") public class BuscaCEPController { private stat...
asked by 16.11.2015 / 17:09
2
answers

How to sort and sort strings without using Collection?

I am creating an employee record with some fields (name, email, phone and salary) in ArrayList that are written to txt. After the data is entered into the array (before moving to txt) they need to be sorted by name, which is the first...
asked by 15.11.2015 / 19:22
1
answer

The Radio Button does not change the text

I created a simple project, and realized that RadioButton does not change the text when rotating the screen. I created 2 functions one called setText() and the other setText2() with different contents, setText() is ca...
asked by 20.12.2015 / 23:03
1
answer

Why does the EntityManager not have the createQuery method with a typed return?

I'm following the Spring-MVC book project of House Do Code, using the latest version of Hibernate, 4.0.3. But at a time, when the book indicated the creation of a quoted query through the following code: // manager é um objeto da classe jav...
asked by 09.11.2015 / 21:58
3
answers

Use methods of an Activity in a Fragment

I'm trying to use some methods of an Activity in a Fragment, but I can not, can someone tell me if it's possible? public class updateMarker extends Activity { TextView uid; //URL to get JSON Array private static String url = "http...
asked by 17.12.2015 / 12:47