Questions tagged as 'java'

1
answer

Use of repetition loop appropriately

   "A very common game between 3 friends is the game of 2 or 1. In this game, the winner is different from the other two, and if all three choose equal values, the game ends in a tie. , B and C, who are playing 2 or 1: their program must show wh...
asked by 29.03.2018 / 02:22
1
answer

How to recover the IMEI from the cell phone programmatically?

So, I need to recover the IMEI from the mobile that is using the app, I tried to use some old methods, but I always get the warning that the method has been deprecated ... could they help me? Thank you in advance! code used: final Telephony...
asked by 12.06.2018 / 19:36
1
answer

How to update Java application of .war format for several clients?

I have a tomcat 8.5 server and deploy a .war file. The same works perfectly. My question is, each client has a server deployed in their company, so I'll distribute the same .war file to various clients. What is the best way to create an autom...
asked by 01.08.2018 / 18:57
2
answers

Doubt calling method with If Java

Well, I'm doing a college project and I'm starting now in java, the question is this: I have 2 tables in the sql server and 2 distinct classes in java, which would be physical person and legal person, the problem is Next, I'm trying to create an...
asked by 19.05.2018 / 23:31
1
answer

Concatenating values directly in the query is problematic?

These days, a guy told me: "Avoid forming SQLs by concatenating strings. Doing this is asking for security issues with SQL injection, and for that reason it's considered a bad programming practice." > What about merge variables into a String t...
asked by 10.02.2018 / 20:44
1
answer

Error trying to insert data to PostgreSQL [closed]

I'm having trouble entering information into DB. I believe the error is in the DAO layer more specifically in the insert function. Could you help me find this error? CONNECTIONFACTORY package DAO; import java.sql.Statement; import java.sq...
asked by 15.02.2018 / 13:39
1
answer

How to fix a Bug loading a Fragment inside another Fragment?

I have a MainActivity with Navigation Drawer, and all items in this browser open in Fragments. When I start the application I load the homepage as follows: android.support.v4.app.FragmentTransaction ft = getSupportFragmentManager().beg...
asked by 02.03.2018 / 02:31
1
answer

Infinite loop with an if within one of in Java

Good evening. I am doing a college job about an ATM and I have a small question. I am creating a do to make the replay menu of the ATM, but before the user enters the box, it will set a value for the accounts, because the balance variable...
asked by 22.04.2018 / 08:04
1
answer

Remove accent on search using android searchview

I would like when searched in my listview João to display João, Joao, joão, joao . I'm using a searchview, I read something about Normalizer but I did not quite understand it. @Override public boolean onCreateOptionsMenu(M...
asked by 03.03.2018 / 19:24
1
answer

The search for my DB placed in a listView (Arrayadapter) returns the address of the object and not the content

I made an APP that saves the date and a string of numbers (8 numbers) in the Android database. I created an object (with date and numbers), but when I go to search all objects inside the Database and put a list it returns the addresses saved....
asked by 02.02.2018 / 13:15