Questions tagged as 'java'

2
answers

Sort method Sort of the Java List interface

What kind of sort does the sort method of a List type collection do? And what complexity do you have? (Nlogn, n, ...)     
asked by 01.12.2017 / 10:21
3
answers

Args [0] by console - JAVA

I have the following program: public static void veureinfo(String filePath) throws FileNotFoundException{ // creem l'objecte File origen = new File(filePath); /** * Si es directori llavors: */ if (origen....
asked by 24.09.2017 / 19:11
1
answer

How does the For cycle work in arrays?

I'm practicing exercises with arrays, I found this code: int[] n = {1, 2, 5, 1, 2, 3, 4, 2, 4, 1}; int[] occ = new int[6]; for (int i = 0; i < n.length; i++) { ++occ[n[i]]; } System.out.println(occ[1]); System.out.println(occ[4]); th...
asked by 23.05.2018 / 07:17
0
answers

Combobox function clean [closed]

I have the function to clean, but I do not know what to put in the quotes or in place of setModel so that when I perform the function the combobox will keep the first option (which would be these lines "-----") to indicate that no Nothing has b...
asked by 16.07.2018 / 18:55
2
answers

I do not work Primefaces in eclipse

I have been trying to implement primefaces in an eclipse project but I can not make it work, JSF works well in the project but when I try to add components of primefaces to the project the result in the browser is a blank page, the only thing th...
asked by 20.03.2017 / 04:50
3
answers

Java performance of abstract vs. interface [closed]

In terms of performance, as far as execution speed is concerned, which is faster, execute a method using an abstract class or interface.     
asked by 15.10.2016 / 20:23
1
answer

Open front camera android studio 5.1

I would like to know if you can guide me in the problem I have, I have an android 5.1 API level 22 device and I am trying to open the front camera from the action of a button, however, despite all the attempts I have made, I have only I managed...
asked by 05.11.2018 / 23:00
2
answers

query about getter and setter

The exercise is of an extreme simplicity, but I want to put a bit of difficulty and do it with POO. I have to ask for 5 numbers and then do an operation with those numbers, there is a condition that the numbers can not be greater than 10. Now, i...
asked by 04.12.2018 / 23:36
4
answers

Help with an exercise in java

Create a program that requests two integer values A, B by keyboard and then shows in screen the sum of all even numbers greater than A and less than B. It must be validated that the number B is greater than the number A, otherwise the numbers mu...
asked by 20.10.2016 / 21:10
2
answers

calling a class from another without a StackOverFlowError occurring

Greetings, I have a program divided by packages and I also divide the logic of the interface, I am using the DAO and Factory models. I have some Get methods within a JFrame - I'll call it Class A - that refer to text fields, access t...
asked by 12.06.2016 / 16:11