Questions tagged as 'java-8'

0
answers

Could not find or load main class

I recently formatted my computer and am having trouble running my java programs. I'm using linux mint and the settings are as follows: java -version java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotS...
asked by 15.10.2016 / 18:29
1
answer

How to check if a ResultSet is empty?

I am doing a query in MySQL and when the query exists it returns the values of good. But here's the question, what value does ResultSet receive when the search does not exist? Type searched for a name in the records of the table if tha...
asked by 11.09.2016 / 21:50
0
answers

ListView with Hibernate 3 not popula

I have the class below, the listarGeneroTreeView () method, captures the values I have in the database. However, I am not able to display this data in the treeview. I know only that it works by a message that I inserted to know if it was right....
asked by 23.09.2016 / 06:43
0
answers

Is it possible to populate a tree list in reverse using stream?

The question is as follows My class public class Node{ private String name; private Node parent; private List<Node> children; public Node() { } public Node(String name) { this.name = name; }...
asked by 25.05.2016 / 14:23
2
answers

What is the purpose of the super command when used in the parameter declaration of a method?

In Java the command super has the function of calling the superclass constructor. However, in the declaration of method forEach() of class ArrayList it is used in a different way than usual, see the signature of the method t...
asked by 12.03.2016 / 02:45
3
answers

How can I use the new Java 8 Date API?

I would like to know how to compile in my Gradle Build to be available the new java 8 date API in my android studio     
asked by 15.03.2017 / 14:30
1
answer

Doubt with parameter in Java 8 to generate random numbers using Collectors.toList () [closed]

I have this method to generate random numbers in ArrayList ; public static List<Integer> gerarAleatorio() { List<Integer> aleatorios = new ArrayList<>(); while(aleatorios.size() < 6) {...
asked by 22.12.2016 / 19:37
1
answer

Application works in eclipse and stops working after generating the executable JAR

I'm working on two applications here in the company that are giving me a certain headache for a reason that the solution should be simple plus I can not find the error, the two applications normally work within eclipse, more when I generate the...
asked by 05.01.2017 / 12:21
1
answer

Error when printing a simple variable

I'm not able to print ultra-simple code in Java. You acknowledge the following error:    Exception in thread "main" java.lang.Error: Unresolved compilation problem:       Can not make a static reference to the non-static field at Excript_vari...
asked by 24.02.2017 / 14:36
1
answer

Problem when doing encode and decode of String

I would like to know why such methods do not behave in a way that:    long2str (str2long (String s)) == String s public long[] str2long(String s){ final byte[] authBytes = s.getBytes(StandardCharsets.UTF_8); final String...
asked by 02.12.2014 / 11:02