Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

and two editText fields in android studio

public void calNumbers(View view) {
    EditText text = (EditText)findViewById(R.id.edit_number1);
    String value = text.getText().toString();       

    EditText text2 = (EditText)findViewById(R.id.edit_number2);
    String value2 = text2.getText().toString();              

    TextView answer = (TextView) findViewById(R.id.answer);      
    long l1 = Long.parseLong(text);
    long l2 = Long.parseLong(text2);

    long result = l1 + l2;
    answer.setText(Long.toString(result));
}
Comment

PREVIOUS NEXT
Code Example
Java :: convert kotlin code to java online 
Java :: connect as SYSDBA java 
Java :: condensed for loop java 
Java :: android java close keyboard 
Java :: access char in string 
Java :: restore 
Java :: view binding 
Java :: REGEX ___ get length of array in java 
Java :: influx cli with docker container 
Java :: Demo Example 
Java :: Uri.builder in android studio 
Java :: open google maps cycling navigation intent 
Java :: for loop optimized java 
Java :: make new file in intellij for java 
Java :: sha1 
Java :: java main setup 
Java :: num1 * num2 
Java :: one to many relation between objects 
Java :: @exceptionhandler spring boot annotation not found 
Java :: java reverse a word 
Java :: which exception is thrown when java is out of memory 
Java :: for-each Loop Sytnax JAVA 
Java :: okhttp Synchronous Network Calls 
Java :: x squared unicode java code 
Java :: Bypass java web security permit All 
Java :: getdatetimeinstance android 
Java :: lmethod java 
Java :: zebra zpl print java 
Java :: jakarta allow cross origins 
Java :: We would like to make a member of a class can access in all subclasses regardless of what package the subclass is in. Which one of the following keywords would achieve this? 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =