Questions tagged as 'java'

1
answer

blank csv file

I'm trying to import a CSV file into the android phone, it does the import the file appears on the android device monitor, but when I open it, it is empty. codes: ImportFtpActivity class: package realsysten.com.br.sigarestaurante; import an...
asked by 15.06.2016 / 21:24
1
answer

Loop code with condition not satisfied [closed]

import java.util.Scanner; public class CodigoDeBarras { public static void main (String[] args) { do { Scanner sc = new Scanner(System.in); System.out.println("Informe os primeiros 12 caracteres...
asked by 30.08.2017 / 21:38
1
answer

Calling the same task more than once

I have the following task: Timer tempovolta1 = new Timer(); TimerTask tarefavolta1 = new TimerTask() { @Override public void run() { jButton1.setBackground(Color.BLUE); } }; I want to call you several times: tempo1.sch...
asked by 07.06.2016 / 04:44
1
answer

How do I make a phase walk along with a character in JFrame Java?

I wanted to know if how to make a camera to character when it reaches the end of the panel start to go next to the character, because when setting a size this.setSize(500,500); the character when passing this mark it disappears and if you...
asked by 06.06.2016 / 15:27
1
answer

Responsibility to keep information of items in a class

Here's an issue that I need to resolve urgently: Consider the code Venda.java . Unassign to maintain information about items sold in class Venda , creating a new class ItemDeVenda . import java.util.ArrayList; import ja...
asked by 23.11.2015 / 20:14
1
answer

Convert Cell type to String in Apache POI

How can I convert a type Cell to String ? String datateste = row.getCell(5);     
asked by 13.09.2018 / 21:09
3
answers

Conversion from C to Java

Consider a method that takes 2 parameters and does a calculation to generate a check digit. Here is the snippet of code I'm having trouble with: char metodoDigito(char num, char qtos) { short soma, peso, remainder; while(...
asked by 24.09.2018 / 19:06
1
answer

Do I need a function to return true or false, depending on the number of letters

boolean b = mascara.matches("\D{0,4}"); I need a mask (such as "GHO-1A23" ) to be checked that contains only 4 letters. If you have 4 just type in a number and if you have less than 4, enter another letter. But in this way, it retu...
asked by 31.10.2018 / 14:36
1
answer

How to check if a file was added to a directory in java? [closed]

I need a Java program, check if a text file has been added to a directory. Could someone help me?     
asked by 23.06.2018 / 05:29
1
answer

Read Integer in Java

I have an exercise in Java where the program should read two numbers typed by the user and he should tell me which one is the greatest! In this case, you can not use only IF , right? Should I also use ELSE ? Yes they are ex...
asked by 02.06.2018 / 01:23