Questions tagged as 'java'

1
answer

pass objects from one class to another [duplicate]

I have the following objects in the Game class how do I call these objects in class Main ? team1=new Team(t1, t2, t3); team2=new Team(e1, e2, e3);     
asked by 07.11.2017 / 19:29
1
answer

Are API components in the aws package? [closed]

I have the following question. And yes, there are "aws" instead of "awt", but I think the correct one would be "awt".    Are API components in the aws package?       I - Panel       II - Label       III - Windows       IV - Checkbox     ...
asked by 18.11.2017 / 17:52
1
answer

Java fragment call conversion to Kotlin

I am creating an app that will have a main activity and some fragments interleaved, in that case I am trying to launch a fragment_main but I can not frazer this Java code flipping code Koltin: FragmentManager fragmentManager = getFragmentManag...
asked by 20.09.2018 / 03:34
3
answers

ArrayList - Place index next to element

I have an application where the user informs via JSF a drive name. When the system finds the drive, it fills in List<String> with the drive data. With this List filled, I need to put the index of each line next to its elem...
asked by 05.09.2018 / 18:38
1
answer

Get and set methods in java for boolean and char

I'm developing a code that uses the get and set methods for input and data processing. The goal is to input with 9 values each with a data type, but I am not able to do the conversions for the char type and for the boolean type. package javaap...
asked by 13.09.2018 / 23:31
1
answer

Get total system memory and system components in java

Is there a simple or reliable method to get the total memory of the computer and / or components or models of the computer components? I searched a lot and the only thing I found was some articles talking about the class com.sun.management...
asked by 14.09.2018 / 05:21
1
answer

Array difficulty

I am trying to make a code of the error in the array though. If anyone can give me a light. Primary code: import java.util.Scanner; public class Tanque { int valor; private int kmTotal = 0; private int gasolinaTotal = 0; S...
asked by 07.10.2018 / 04:19
1
answer

"String index out of range: 5"

The error mentioned in the question in my program in java is occurring. The program is a bar code reader. The user informs the code digits (with the exception of the last one). The sum of the numbers q is in the odd position, and the odd numb...
asked by 31.08.2017 / 19:10
1
answer

Change array structure [closed]

How to change the structure of an array? It can be using excel or via programming. I already did my solution with Java but it was a damn gambiarra :). Plus it's not generic enough. Is there a design pattern that solves this? The final goal is...
asked by 28.08.2017 / 20:13
1
answer

MVC Dao - How do I separate the DAO from the Control Class? [closed]

1-My DAO is within the Breathing Control Class, how do I separate it into a DaoBairro? 2-Does ConnectBank have Factory default? Details here, with the codes: link package Controle; import Conexao.ConectaBanco; import java.sql.Prep...
asked by 03.09.2017 / 17:15