Questions tagged as 'java'

2
answers

Error updating the entire JAVA table

I am trying to perform a mass update to update all the prices of products registered in the system, adding the value passed by the user to the unit price of the product registered, according to the company entered in the system and the product c...
asked by 18.02.2016 / 14:03
1
answer

The correct would be to leave the attributes of the abstract class as private or protected?

I do not know how I should leave those attributes.     
asked by 13.02.2016 / 18:24
3
answers

Generate setters only in the class constructor or generate outside the constructor

In Java classes, it is common for to create private attributes and to generate getters and setters for these attributes. But, I read that you can do something a little different: only generate the getters and leave the setters in the...
asked by 08.08.2014 / 15:06
1
answer

Start my Windows application in System Tray

I have no idea how I make my application start with Windows 7 already in System Tray mode. That is, start with Windows and get the program icon next to the Windows 7 clock.     
asked by 12.05.2014 / 16:09
5
answers

How to create a vector without determining its size in java?

I have a TesteAplicacao class that is to test and a Teste class with attributes and methods. When creating a vector in Java: Teste[] t = new Teste[10];// veja que teve definir um tamanho Would you like to create vector wit...
asked by 03.03.2016 / 17:24
3
answers

Fill string with leading zeros

I'm doing an OS work and need to turn decimal numbers into binaries. So that's fine, because the method below takes an integer and converts to binary. My problem is this: When I put it, for example (integer 1), it returns me correctly 1. But...
asked by 30.10.2014 / 11:34
1
answer

What is the best way to store monetary values in SQLite?

this post about the lack of precision of double , and practically all the links of the post links. So I realized that this was a vulnerability of my software in production (since I have rounds for every corner before doing...
asked by 05.08.2015 / 16:57
2
answers

Class nested in Java

I need to have nested classes in Java. Why does not the following implementation work? public class A{ private class B{ public B(){ System.out.println("class B"); } } public static void main(String[] ar...
asked by 20.10.2014 / 21:42
1
answer

Is it possible to put 3 colors on a button?

I need to divide the button into 3 "equal pieces" and each piece has a different color.  For example, a button with the colors Blue, Green and Red, each occupying 33.3% of space. How to do this?     
asked by 08.10.2017 / 04:41
2
answers

Method equivalent to BigInteger.and () in C #

I need to convert the java code below to C #: public static boolean verificaPermissao(BigInteger perm1, BigInteger perm) { if (perm1 == null || perm == null || (perm1.equals(BigInteger.ZERO) || (perm.equals(BigInteger.ZERO)))) ret...
asked by 04.05.2017 / 19:15