Questions tagged as 'java'

1
answer

How to play sound in a java program?

I need to do a Java program, where the user enters the password and it is displayed on a TV monitor, this program will be used in a restaurant, so when the request is completed, the TV request and sound. How do I add alert sound to the progra...
asked by 15.04.2015 / 15:57
2
answers

Problems comparing dates with Calendar

I am developing a system for hotel and in Reservation precise that the date of entrance is greater or equal than the one of the reservation, and the one of the exit is greater than the one of the entrance. I made these conditions, but when I pro...
asked by 23.04.2016 / 23:45
2
answers

Doubt about reading txt files on Android?

Based on this stackoverflow question in the answer, this code is suggested try { AssetManager assetManager = getResources().getAssets(); InputStream inputStream = assetManager.open("nome-do-arquivo.txt"); InputStreamReader inputS...
asked by 21.02.2016 / 21:04
2
answers

Error adding CSS / JS to the head of a page in JSF

I'm trying to include a CSS in a JSF view. However, I am not succeeding. Below is an excerpt from the view: <h:head> <h:outputStylesheet library="css" name="bootstrap.css" /> </h:head> The version of JSF is 2.2.12....
asked by 27.07.2015 / 21:54
2
answers

Convert ListT to T ... dynamically in calling a method

I'm in need of something that seems to be simple, but I've been researching and trying for some time and have not found anything that helps. Problem I have a list of type List<T> that I get as a parameter of another method,...
asked by 31.07.2014 / 22:08
2
answers

When executing "java" command in CMD, it is not possible to locate or load the main class

After you run the javac command normally and create the .class file, I try to execute the command java plus it gives this problem of not being able to locate nor load the main class. I think it might be a mess on the envi...
asked by 10.02.2015 / 16:27
2
answers

How to convert Lowercase String to UPPERCASE?

My question is in switch (opcao) . To perform one of the cases it is necessary to enter UPPERCASE letters. There is some function of converting strings or characters in Java from lowercase to uppercase as in C ( tolower and toupp...
asked by 20.10.2017 / 17:27
1
answer

What is Entity Manager?

What is the Java Entity Manager? Looking at a lesson on java, the teacher mentioned that the% method of entity manager and that this method, when searching for a record in the database, saves the object in an area where it happens to be "mo...
asked by 04.09.2017 / 19:04
1
answer

Error rounding BigDecimal

I'm doing a calculation with two methods, but since the attributes are of type double , I'm using BigDecimal to perform the operation and after that convert to two decimal places only. I'm having difficulty converting, I've tried...
asked by 17.11.2015 / 03:49
5
answers

What tool to use to convert a visually developed UML to code?

I need an Eclipse tool / plugin that allows me to develop class diagrams, activities and sequence in UML and to generate the code. I often use Eclipse with Omondo plugin, but it looks like it has been discontinued. The last version I got was...
asked by 30.01.2014 / 11:43