Questions tagged as 'java'

1
answer

Convert Sequence Diagram to Java

I am solving exercises on modeling, and in one exercise a sequence diagram is given, and I would like to convert this diagram to Java code, whereas execution starts from an X method of class A, so I can better understand what's happening. The di...
asked by 01.06.2016 / 16:37
1
answer

SortBy in JSF, brief explanation of what it does?

Could someone explain the function of sortBy in JSF ?     
asked by 23.05.2016 / 19:58
1
answer

NullPointer Java Even though the variable was initialized

I'm having a problem to set a label from another controller, my project is structured as follows: FilmeOverviewController, is the overview that contains a tableview, in that tableview you can select the movie and etc, then I created a handle for...
asked by 10.06.2018 / 00:13
1
answer

How to get a specific field from a class even being inherited

I'm having trouble trying to get a field of a class, I'm always getting the error NoSuchFieldException . What is known is that this field is inherited and deprived of another class, but the parent class can be a child of another, and so on...
asked by 22.07.2018 / 20:26
1
answer

How many classes can we have in the same package?

How many classes can we have in the same package?     
asked by 24.07.2018 / 20:39
1
answer

Is it permissible to perform the% module operation with double number in java, and how to change a unique position of a string in java? [closed]

My doubts .. Is it permissible to perform the floating-point number% module operation in java, and why? Because in compilers such as c ++ this operation is not allowed. How do I access an element of a string and change it? Example, I ha...
asked by 01.08.2018 / 22:22
1
answer

"per unit" logic in java [closed]

How can be a method to return the following: Knowing that 220 equals 0.3275 and that with each addition of 0.0049 in the value of 0.3275, it will increase by one unit the 220, or every decrease of 0.0049 in the value of 0.3275 will reduce by...
asked by 16.08.2017 / 19:38
1
answer

make print with quotation marks [closed]

I need to write a help program, but I need to use phrases like, and type a "Cabinet" ... and I can not use the "" in print, because they close the box and open another, as it does to solve that? Thank you     
asked by 28.03.2018 / 13:33
2
answers

Doubts about sum method

How to make a method that takes an integer as a parameter, computes the sum and returns the sum? I tried to do this, but it did not work, the sum is not done. public static void main(String[] args) { int[] vetor = new int[10]; int numer...
asked by 25.08.2017 / 21:00
1
answer

Can anyone give me a notion of how I do [closed]

Compute the representation of the operation of a lamp, where it is possible to switch on, switch off and check that the lamp accesses I did this: class Lampada { boolean aceso = true; void apaga() { aceso = false; } void...
asked by 06.09.2017 / 00:37