Questions tagged as 'operador'

1
answer

What is the '' operator used for in Java?

I have a problem with the use of the character '> >' I would like to know what function actually fulfills what it does considering something like: System.out.println(5>>1); the result is 2 but why ?, I understand that i...
asked by 09.08.2017 / 15:13
4
answers

Addition and subtraction in a chain

I need to implement the following: Entry (a string): 5+45+100-125+5-10 Exit: = 20 Here the code implemented only for positive numbers: String operacion="10+200+3000"; int tam = operacion.length(); String A[] = new String[1...
asked by 09.12.2016 / 01:36
1
answer

(Overloading) - Overload Operators in Python

How can I overload the (+, -, *, /, ... , //) operators on an object in python. Example: a = Vector(3, 5) b = Vector(2, 7) print(a + b) # Output: <Vector (5.000000, 12.000000)> print(b - a) # Output: <Vector (-1.000000,...
asked by 12.08.2018 / 02:38
1
answer

Java doubt with equals () and with ==

Until a few years ago if I did in Java    "Hello" == "Hello" gave me as a false result, today I saw a code in which they used it with JDK 10 and out of curiosity I went to check it, and it actually returns true, someone can explain why th...
asked by 08.09.2018 / 20:30
2
answers

Add integers of an array in python

This is a simple question but I have not found any post related to this topic. matriz=[[1,2,3],[4,5,6][7,8,9]] I would like to add all the grids of this matrix to each other (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9) so that I returned 45 in a new...
asked by 23.05.2018 / 23:43
2
answers

Take the value of the operator to perform javascript operations

I am starting to learn javascript and the fact is that we are doing a calculator and I do not know how to do it so that I do not concatenate the two numbers that I have to add: (when adding 12 and 20 in the alert I get 12 + 20 , that is, the + s...
asked by 02.11.2017 / 20:20
3
answers

Can a new operator be created in JavaScript? [duplicate]

I need to use this logical operator: ⇒ which will be inserted in a string like this: var mystring = "(true ⇒ false) ⇒ true"; That way I should be able to evaluate that expression with eval(mystring) and return the truth value to me...
asked by 03.06.2016 / 02:56
1
answer

php error Message: Unsupported operand types

Hi, I'm doing a php operation with parentheses; and I get this error error code: Fatal error: Unsupported operand types in C:\xampp\htdocs\olPrueba2\application\controllers\Admin.php on line 705 A PHP Error was encountered Seve...
asked by 07.04.2018 / 00:56
2
answers

Differences between the Elvis operator: and the zero coalescer operator

Reading this question I found a reference to the call Elvis operator (link in English) or ?: that is very similar to the operator || used in javascript or also called operator of null coalescence (link in English). Investi...
asked by 07.01.2016 / 15:38
1
answer

Doubt with Operator Overload Exercise + and -

The exercise asks me to implement the addition and subtraction each with a single member method. And you have to be able to execute the following code: int main() { Punto p(12.34,-56.78); Punto r,s;...
asked by 15.04.2018 / 21:05