Questions tagged as 'java'

1
answer

Passing JS variable to ManagedBean

I have a variable in js, and I need to send it to my ManagedBean, what is the most correct way to do this?     
asked by 03.04.2018 / 14:21
2
answers

How to delete a specific child in Firebase?

I want to exclude only the 1st child (L7jrJ6DtQWrmZsC4zvT) from Firebase through an option in an Android app. I searched several places and could not find it. I only found the option to delete the entire database. Can anyone help?     
asked by 16.03.2018 / 19:52
1
answer

Kotlin + RX Observer without Anonymous

I'm studying Kotlin Android and RX and just see examples like: val api = StarWarsService() api.loadMovies() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(...
asked by 12.04.2018 / 19:40
1
answer

Error changing activity

Good evening, I have an app with two Activity that loads external data, and I'm having trouble changing the Activity before it loads all the data. When I call the Activity Category, it loads external data, but if it calls the Activity before the...
asked by 22.06.2018 / 22:52
2
answers

Why does '08' generate error within the Eclipse?

I have a class with ' int = dia, mes e ano ' and in the other I'm calling them. But it caught my attention was that when I put the value '08' says    'The literal 08 of type int is out of range'. But when I put 07, compile without p...
asked by 25.02.2018 / 14:21
2
answers

Variables and structure of flow control if in Java

The user is asked to enter 3 numbers and the end line is " The largest value is X the middle value is Y and the smallest value is Z ". Where X, Y and Z are the numbers entered. I can only do with if s. I'm testing on cmd. How could I...
asked by 28.02.2018 / 16:44
1
answer

How to present data in the ArrayList in Java [duplicate]

How do I sort information stored in an ArrayList in java? Follow the code for review. public class Main { public static void main(String[] args) { Aluno aluno = new Aluno(); ArrayList<Aluno> array_aluno = new ArrayL...
asked by 22.02.2018 / 18:37
1
answer

How to call method with array parameter in java?

I'm starting in java, I just had one class. So I'm doing a program to add the items to an array, and have to use method. This is my code. Main: package exercicio3e4; public class Principal { public static void main(String[] args) {...
asked by 24.02.2018 / 13:13
3
answers

How to Generate random numbers without repetition in Random? [duplicate]

So far I have been able to generate the random numbers and store them, but I have no idea how not to generate repetition. So far, it looks like this: package curso1; import java.util.Random; public class Curso7 { public static void mai...
asked by 04.05.2018 / 05:53
1
answer

Program that reads real number in Java

I have a pretty stupid question, let me say, but I do not remember what I should do to be correct. I should create a program that reads an integer and prints on the screen. Here's what I have: import java.io.IOException; import java.util.Sc...
asked by 04.05.2018 / 23:45