Try this:
System.out.println(myInt);
Note that myInt
does not come with ""
here! What you are doing is actually printing the String “myInt”. But if you want to print the value of the variable myInt, just put myInt
without ""
.
More Related Contents:
- JAVA variable as 2 types [closed]
- Assigning variables with dynamic names in Java
- Variable might not have been initialized error
- How to redirect multiple types of users to their respective Activities?
- Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio
- Compilation failed to complete:Program type already present: com.google.android.gms.internal.measurement.zzabn
- Android Studio debugger highlights the wrong lines
- Error: Unable to run mksdcard SDK tool
- Import Google Play Services library in Android Studio
- No IDEA annotations attached to the JDK 1.8 (C:\…), some issues will not be found
- Android Studio cannot resolve symbol but code executes correctly
- Why is it not possible to shadow a local variable in a loop?
- :app:dexDebug ExecException finished with non-zero exit value 2
- Increment variable names? [duplicate]
- Java instance variables vs. local variables
- package android.support.v4.app does not exist ; in Android studio 0.8
- Assign JavaScript variable to Java Variable in JSP
- Variable default value in Java
- Android Studio Convert ISO string to “America/New_York” when adding to event to calendar
- Failed to import new Gradle project: failed to find Build Tools revision *.0.0
- How can I pass values between a Dialog and an Activity?
- How to print to the console in Android Studio?
- Polymorphism with instance variables [duplicate]
- How do you know a variable type in java? [duplicate]
- Duplicating objects in Java
- android studio with Java compiler error: string too large to encode using UTF-8 written instead as ‘STRING_TOO_LARGE’
- tools.jar seems to be not in Android Studio classpath on Windows 8
- How to update edittext whenever a quantity is added in android studio
- Exception in thread “main” java.lang.NoClassDefFoundError: junit/textui/ResultPrinter
- Got “unsupported class file version 52.0” after including a module to a project