Questions tagged as 'java'

2
answers

Android - Delete text in a ListView

I created a task application to be made that is displayed in a ListView. I'm using SQLite with a table with the columns: ID, task, completed. I want you to scroll through the records, if the "completed" column is equal to "s", the text in...
asked by 01.06.2018 / 13:54
2
answers

Search in an ArrayList in Java

I'm trying to do a search using .contains(); of ArrayList , but I can not return. It is option 3 public class Fruteira { public static void main(String[] args) { Scanner input = new Scanner(System.in); List<Fr...
asked by 04.12.2017 / 19:15
3
answers

Help on how to get the last word of a string and append to the beginning using java

I have a full name: Jais Pereira Guedes Godofredo The example below, I get the last word, but how to print with this result: Godofredo, Jais Pereira Guedes public class Aula1{ /** * @param args the command line arguments */...
asked by 02.01.2018 / 15:56
3
answers

How to check encrypted passwords with the user input passwords in the database?

I am creating a program in which the user will enter the login and the password before entering the system, and after he has entered his input, the passwords will be saved in the database, and then I will check if the encrypted passwords hit the...
asked by 02.06.2016 / 21:12
2
answers

Technologies for Instant Messaging App [closed]

I want to develop an Android (native) instant messaging app like WhatsApp for my TCC, I would like to know which technologies for the Java platform support this kind of communication, some API etc. My main question is about real-time communic...
asked by 17.02.2016 / 20:21
2
answers

One person may have several phones. How to do this with vector and not with list?

I'm not able to associate Telefone with class Pessoa , a person can have up to three phones. How do you do that? package model; public class Pessoa { private String nome; private String endereco; private String sobrenome; privat...
asked by 20.03.2016 / 00:22
2
answers

Generic return method

How do I make a method that returns a type entered in the parameters? public <E> E to(E e) { return (E)obj; } String st = to(String); Integer it = to(Integer); But this generates error, is there another way to do this?     
asked by 04.04.2015 / 01:52
1
answer

Browse HashMapInteger, HashMapInteger, ArrayListInteger

I have the following HashMap : HashMap<Integer,HashMap<Integer,ArrayList<Integer>>> hm = new HashMap<>(); When I do this: Set<Integer> keys = hm.keySet(); for(int i : keys) System.out.println(i + ": " +...
asked by 03.12.2014 / 12:31
2
answers

Doubts - Java algorithm

I'm trying to solve an algorithm in java that is like this.    Write a program to print the following: 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 0 1 2 3 4 5...
asked by 10.11.2017 / 22:44
2
answers

Remove characters from a string between two specific characters in java

I have a String that contains the file path, and I need to remove the characters that come after the last "/" to the end of the string. Can anyone help me with this? ... Example: String comando = "C:/Users/Vinicius/Documents/N...
asked by 15.10.2017 / 17:37