Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

2 power 8 in java

// 2 power 3 = 8 
//in java here is how its done:
class Main {
  public static void main(String[] args) {

    int base = 2, exponent = 3;

    int result = Math.pow(base, exponent);
    System.out.println("Answer = " + result);
  }
}
/*
result:
Answer = 8
*/
Comment

PREVIOUS NEXT
Code Example
Java :: discord jda remove @everyone from channel 
Java :: dagger kapt dependency and plugin 
Java :: java test file exist 
Java :: how to change color of radio button in android 
Java :: alertdialog show in android 
Java :: android java optional arguments 
Java :: print hashtable in java 
Java :: why java is secure 
Java :: module-info.java module not found 
Java :: how to read from a txt file in java 
Java :: decimal up to 6 places in java 
Java :: java split on tab 
Java :: check if string is null or empty java 
Java :: java swing enter key press event 
Java :: coding collections clear method java 
Java :: iterator constructor java 
Java :: how to import java.util 
Java :: how to remove components from a JFRame java 
Java :: How to create a union-find data structure, in Java? 
Java :: selet all elemnts 
Java :: java regex ip 
Java :: array to array list 
Java :: loop through keys only in hashmap java 
Java :: java write 
Java :: get first character of string java 
Java :: java init arraylist string 
Java :: java suppress warnings rawtypes 
Java :: prime number between given range in java 
Java :: capitalize each word in string java 
Java :: sorting char array in java 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =