Questions tagged as 'java'

1
answer

compilation error java (javac) [closed]

I have a file "poo1.java": package pootest; public class init{ public static void main(String[] args){ Caneta bic1 = new Caneta(); bic1.cor = "azul"; bic1.tampada = true;...
asked by 15.10.2018 / 01:50
1
answer

Java Daylight Saving Time

We made the change to the 2018 daylight saving time entry in the Operating System (Linux or Windows), but the JAVA application shows the wrong time (with daylight saving time).     
asked by 23.10.2018 / 18:20
1
answer

Insertion Sort (sort order) [closed]

Could anyone give me examples of the everyday where the sort order is used? Note: Not being card sorting     
asked by 05.10.2016 / 22:18
1
answer

How to access a ManagedBean through an external js file?

How do I access a managed bean jsf through an external javascript file? I'm trying to access it as follows: $("#botaoCadastroMaterial").click(function(){ '#{cadastroMaterialController.salvar()}'; }); but it is not working. Below is...
asked by 20.08.2016 / 20:12
1
answer

Logical operator crashing?

Hello, I'm doing a project in java that involves stacks and queues, but that's fine, but among some conditionals I did with if one of them "presented" an error (Actually do not present or do what he should do is the "error" in question ... Fo...
asked by 23.04.2018 / 00:08
1
answer

Java Error - Scheduled

I'm encountering the following error when trying to compile the image code. I created a project just to test the code, and this appears. I have not found similar error elsewhere, can anyone help me? Followthecode:packagetestet;importjava.time.L...
asked by 27.04.2018 / 13:48
1
answer

Obfuscating a string in source code

I need to hide a string in the source code of my program. Searching I found a programmer who hid the phrase "Hello World!" through a string of if and loop repetition attaching everything to a numeric array. The work can be viewed he...
asked by 15.11.2017 / 21:41
1
answer

Recursive Fibonacci Sequence [closed]

I'm studying Java and I need to do a recursive Fibonacci program, but I have no idea how to do this. Please, if you know, help me. Here is an inductive code: public static void main(String[] args) { int n = 5, i = 0, a = 0, b = 1; Sys...
asked by 14.11.2017 / 20:28
1
answer

c3p0 generating many connections

Code that gets the connection InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:/comp/env/jdbc/oracledb"); Connection connection = ds.getConnection(); connection.setAut...
asked by 24.10.2017 / 14:31
2
answers

Read .txt files and put them in an ArrayList

How do I read the .txt file below and turn it into an ArrayList? Alicate;6;3.4 Martelo;10;4.5 The ArrayList in the end would look like this: [[6, 3.4], [Hammer, 10; 4.5], ...] try{ FileReader fr = new FileReader("ferramenta...
asked by 16.01.2018 / 15:28