If you want to test Java code and don’t have access to a development environment, you can still use a public service like ideone.com. I did that for you over here. Your program prints
y is:1
y is:2
y is:3
y is:4
y is:5
y is:6
y is:7
y is:8
y is:9
More Related Contents:
- Parsing query strings on Android
- Recommendations on a free library to be used for zipping files [closed]
- Setting a log file name to include current date in Log4j
- Android download binary file problems
- Multi-project test dependencies with gradle
- Why is Java’s boolean primitive size not defined?
- Unable to read JPEG image using ImageIO.read(File file)
- JavaFX Location is not set error message [duplicate]
- Embed Java into a C++ application?
- Why do we need copy constructor and when should we use copy constructor in java
- Returning a ResultSet
- Fetch first element of stream matching the criteria
- Why does null reference print as “null”
- How to compare two dates along with time in java
- Extract the difference between two strings in Java
- Setting Short Value Java
- Why do java if statement fail when it ends in semicolon [duplicate]
- How to check the input is an integer or not in Java? [duplicate]
- How does Java Garbage collector handle self-reference?
- Read data from CSV file into ArrayList and display in XY Chart
- SwingWorker in another SwingWorker’s done method
- Raw Strings in Java – for regex in particular. Multiline strings
- NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
- IntelliJ Organize Imports
- Eclipse does not highlight matching variables
- Check if Java bytecode contains debug symbols
- Where I can find a detailed comparison of Java XML frameworks? [closed]
- Declare maven dependency on tools.jar to work on JDK 9
- difference between @Component and @Configuration in Spring 3
- How/Can I use base64 as image source in a Jasper Report template?