Questions tagged as 'java-8'

1
answer

Development of mobile games

Is it possible to develop mobile games using the new Java ME SDK (SDK 8)? That is, can I do projects in which a mobile emulator appears and develop for it? I'm kind of confused about this. I know there are older versions that use midp 2.0 wit...
asked by 16.08.2014 / 06:11
1
answer

map.forEach Unexpected return value

I have the following map: private static Map<ParseCreator, Parseable> map = new HashMap<>(); I run this map as follows: for (Map.Entry<ParseCreator, Parseable> entry : map.entrySet()) { ParseCreator creator = ent...
asked by 09.05.2018 / 13:52
1
answer

How to restrict the values of a date in a field of a form in java?

I have a form built with Swing (Java) that has some fields, among them there is one that is the Birth Date (a String that receives the value of a date and has a formatted field ##/##/#### .) is represented by the variable jTFData...
asked by 27.03.2016 / 20:00
1
answer

Mapk Collection, v Methods

Doubts about methods replace : compute : computeIfAbsent : computeIfPresent : forEach (briefly all that use function or biFuntion within input parameter) Is replace really necessary? this...
asked by 22.08.2014 / 15:21
1
answer

Copy only superclass content in java

Is there a way to copy only the contents of the superclass into another class of the same type through a subclass instance in Java, without accessing getters and setters one by one? Example: public class A { private Integer id; priv...
asked by 20.06.2018 / 14:40
2
answers

Error in request Delete in Spring: console indicates that method is not supported

I am making a request via Ajax to delete a user and I get the message that the delete method is not supported, does anyone have any idea what it could be? My controller: package com.br.livraria.controller; import javax.servlet.http.HttpServ...
asked by 25.10.2017 / 14:53
1
answer

Formatting a textfield with currency style

I'm using NetBeans, and I can not show the value formatted as currency, for example $ 1,200.00. When I type in the text field, the zeros do not appear. I have a form with two fields: one for name and one for salary. In both, I'm using text field...
asked by 29.08.2016 / 01:55
1
answer

Exception in thread "main" java.lang.UnsupportedOperationException

Predicate is a functional interface that allows you to test objects of a given type. Given Predicate , removeIf will remove all elements which return true for this predicate. When trying to use the removeIf() method...
asked by 30.03.2016 / 18:39
1
answer

Java 8 - Collect elements from a list

Good morning. I would like to collect specific elements from a list. I could do the Java 7 style, but I'm curious how I would do it in the Java 8 style. For example: [1, 2, 3], [1, 2, 3], [4, 5, 6]] = An ArrayList of Object [] Collec...
asked by 02.01.2015 / 12:07
1
answer

Calculating hours with Java 8

I was doing some testing with java 8, and was trying to figure out the difference between hours of two dates. I did it three ways, though, I do not know which one would be the right one and would like your help. LocalDateTime t1 = LocalDateTi...
asked by 26.11.2014 / 00:21