Questions tagged as 'metodos'

1
answer

Pass variables and perform actions between classes in C #

I am learning the C # language, also using the VisualStudio tool, and I can not pass a variable (BtnColor in the code) from one class to another, and then perform an action from the value of that variable. This is the form I try to create in Vis...
asked by 25.08.2018 / 22:52
2
answers

Is there any way to deny something like isinstance () in Python?

To make my question clearer, I give an example in code R which is the language in which I have a little more experience. Suppose I have the simple variable "a" that is worth 5. First of all I want to validate if it is numeric using is.num...
asked by 16.11.2018 / 20:50
2
answers

Print data belonging to a TreeMap

In the consultas() method, how could you print the student's name and grades? Until now, what it prints are memory addresses, and not the name and qualifications. Note: The map that receives this method is a map that returns a met...
asked by 27.09.2017 / 01:20
2
answers

How to call a method that belongs to another class? JAVA POO

Hi, I'm doing a program on the weight of people and I have to do several methods one of them is: averageWe're in the class Statistics of People but my problem is that I do not know how to call a variable or the method getPeso () which is of the...
asked by 07.12.2018 / 04:50
2
answers

factorial of a number without overflowing the long variable?

I have a code that performs permutations, and at first seems to work, the problem is that when you enter a number greater than 20 the results are erroneous and as I read and it is because they leave so many result characters that are not possibl...
asked by 01.08.2017 / 09:59
1
answer

Obtain capacity of an ArrayList

In an exercise I am asked to obtain the size and capacity of a previously filled Vector and ArrayList. In the case of the vector there are not many problems to do it, because it has a method. Vector<Object> planetas = new Vector<&g...
asked by 15.09.2016 / 10:16
2
answers

Failed to run AsyncTask on DatePickerDialog

This is my code which I originally used, in this code I try to execute an asynchronous method in a DatePickerDialog @SuppressLint("ValidFragment") public static class DatePickerFragment extends DialogFragment //Se modifica a metodo estatico...
asked by 19.07.2017 / 17:04
1
answer

Is it possible to save data in a mysql database using a method?

Hello community, I am an apprentice in java programming and I would like to know if it is possible to register to bd MySql using a public string method, adding the property of the data to be stored in a bd MySql, sorry for the question...
asked by 07.10.2016 / 04:17
2
answers

How do I avoid too many open connections?

My Dilemma is that I have a method of type MySqlDataReader that executes a query that sent it by parameter and returns the data ... To read this data I must create a Variable of the same type from where the Method is called, until then Well, it...
asked by 26.05.2017 / 17:55
1
answer

Create Lists with BindingList C #

code to create a bindingList: using System; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Windows.Forms; using System.Data.SqlClient; using System.IO; using Negocio; using Entidades; usin...
asked by 06.07.2017 / 14:29