Questions tagged as 'java'

3
answers

Is there any technique for applying code maintenance?

In addition to applying high cohesion and low coupling, how to deal with codes like this? They may be readable but this excess of logical operators, I do not see it possible to refactor or even with switch-case ....
asked by 06.04.2015 / 21:00
3
answers

How to implement the ActionBar fixed below, android version 2.x or higher?

I'm implementing Action Bar in android version 2.x or higher, however, I'm having difficulty with how the elements are displayed. In version 2.x the bar appears below, only without the names of the menus, and in version 3.0 or higher the action...
asked by 14.02.2014 / 17:02
1
answer

How to transform an IPath into Path

I'm wondering how to get a Path through IPath , I have a variable of type IPath but I have a method that requires a Path , tried to cast but was unsuccessful,     
asked by 07.02.2014 / 17:11
1
answer

How to create a .jar file properly?

I, who am totally new to Java, am trying to compile a project "Hello, World!" . I followed some Stack Overflow steps English. I followed all the steps, but when I open my jar, it gives error. I opened it, and I saw that it was the manifest's f...
asked by 08.02.2014 / 11:20
1
answer

Get cookies / web browser

I know that java gives us the ability to manipulate cookies, but there goes the question. Is it possible to get cookies from the web browser? if yes, from which method?     
asked by 24.11.2014 / 05:25
1
answer

How to pass exception message to an HTML page from a JSP?

I have a college exercise in which I have to create a .jsp page that receives a "id" parameter and runs a query to delete the record inside the class products with this id and in case of any exception I send the user to page error.html passing a...
asked by 01.12.2014 / 20:58
1
answer

How do I apply a currency mask in my listView? [duplicate]

I'd like to know how to implement my monetary mask on ListView of products. I ask that you be the most specific and detailed because I do not have much experience. Thank you. public class ProdutoAdapter extends BaseAdapter {...
asked by 18.01.2016 / 20:39
1
answer

WebService made with NuSoap in PHP. I can not access in Java

I developed a WebService in PHP, using the NuSoap library. Webservice is already hosted and running. When I develop a client using PHP, whether using NuSoap or using the native PHP soap class, I can use Webservice with no problems. But when I tr...
asked by 12.07.2014 / 18:36
1
answer

Returning data from Java to Ajax using Json

I have a Java application, and a module that inserts products into the base using REST. In the base the id of the product is autoincremental, and as soon as I add the same in the base, I need the id so that the table with the products are update...
asked by 27.06.2014 / 15:26
1
answer

Error: can not convert from double to float

Why float is not accepted for the numbers 0.197 and 0.185? Code: float salBruto, salLiquido; Scanner ent = new Scanner (System.in); System.out.println("Informe o seu salário:"); salBruto = ent.nextFloat(); if (salBruto >= 1500 &...
asked by 17.09.2018 / 05:02