Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


steviedoyle
java test
0 Answer(s)      4 years and a month ago
Posted in : Java Beginners


Trace through the following program segment and state clearly the output that will be generated:

public static void main(String [] args){
int no1;
int no2;
for (no1 = -2; no1 <= 1; no1++){
for (no2 = 0; no2 < 6; no2 = no2 + 3){
System.out.println(no1 + ? ?+ no2);
}
}
}

This is a question from a past paper and below are the answers, but, i am still unawre on how to work out the question. How do you do it?


-2 0
-2 3
-1 0
-1 3
0 0
0 3
1 0
1 3

Advertisement
View Answers

Related Tutorials/Questions & Answers:
java test
java test  How to read the data from an .csv file and write into an xml file using java? (test_sample.csv(it should contain at least 39 lines)) i...:\\Documents and Settings/janardhany/Desktop/test_sample.txt
how to conduct the test in java
how to conduct the test in java  how to conduct the test in java
Advertisements
java test - Java Beginners
java test   Trace through the following program segment and state clearly the output that will be generated: public static void main(String [] args){ int no1; int no2; for (no1 = -2; no1 <= 1; no1++){ for (no2
online test application in java
Online Test Application Table Of Contents Introduction To Application Database Design Creating Data Access Object (DAO) Design Pattern Creating Views Writing Actions Mapping Application Admin Module User Module Download
Create test engine - Java Beginners
Create test engine  How can create a test engine dat generates questions randomly using javax.swing in java
online test application in java
online test application in java  Can questions come in html file (test.html) if we link test.jsp with test.html   We have taken radiobuttons in our application, you can take textarea, textfield etc. Here we have created
Java File Handling Test Results
Java File Handling Test Results   Is somebody able to help me with this Write a program to read each name from the file and prompt the user... java.io.*; public class Test { public static void main(String[] args) throws
junit test case - Java Beginners
junit test case  how to use junit for testing email id format  Hi Friend, Please visit the following link: http://www.roseindia.net/junit/ Hope that it will be helpful for you. Thanks
online test project on java using servlets and jsp
online test project on java using servlets and jsp  as i am doing online test project on java using jsp and servlets ,,,the problem is in the code...;Here is a jsp application. Here we have created a table test
code for timer in java netbeans for online test series countdown timer
code for timer in java netbeans for online test series countdown timer  code for timer in java netbeans for online test series countdown timer
How to bookmark and preview last question in a java test engine - Java Beginners
How to bookmark and preview last question in a java test engine  Am creating a test engine with java, how can i generate questions randomly, allow a user bookmark a question view previous question and review questions
How to bookmark and preview last question in a java test engine - Java Beginners
How to bookmark and preview last question in a java test engine  Am creating a test engine with java, how can i generate questions randomly, allow a user bookmark a question view previous question and review questions
test case
test case  Hi Can you explain me how to write test case in java. regards kennedy
WRITE AND TEST
WRITE AND TEST   WRITE AND TEST PROGRAM TO ACCEPT A STRING? 1).WHICH STARTS WITH 'S' OR 's' 2).ENDS WITH "nd" 3) THE LENGTH OF THE STRING SHOULD BE 10 OR LESS
Online test
Online test   I am creating a project for online test system. There should be a timer,on pressing next button it will retrieve a next question and it will show on the same page,on completion of test it will show result
CODING TEST
/class structure ΓΆβ?¬ΒΆ Choice of data structures ΓΆβ?¬ΒΆ Unit Test cases ΓΆβ?¬Β
CODING TEST
/class structure ΓΆβ?¬ΒΆ Choice of data structures ΓΆβ?¬ΒΆ Unit Test cases ΓΆβ?¬Β
putting words to line number form a java file/test file and show occurrence
putting words to line number form a java file/test file and show occurrence  hi all i want putting words to line number form a java file and show... and BinarySearchTree and please help me in java coding
online test project
online test project  i need online test project in java using struts...kindly help..   Have a look at the following link: http://www.roseindia.net/struts/struts/struts2.2.1/onlinetestapp
Query to Test MySQL Performance
Query to Test MySQL Performance  Query to Test MySQL Performance
unit test in php - PHP
unit test in php  How can i run the unit test in PHP
Junit @Test annotation
Junit @Test annotation  What is the Application of @Test Annotation in JUnit ?   The Test annotation tells JUnit that the public void method to which it is attached can be run as a test case : public class Example
optional parameter of Test annotattion
optional parameter of Test annotattion   What are two optional parameters of @Test annotation ?   The Test annotation supports two optional parameters. The first, expected, declares that a test method should throw
test case - JUNIT
test case  Hi i am doing project on online reservation i want to know how to write the test case template for this online reservation
optional parameter of Test annotattion
optional parameter of Test annotattion   The Test annotation supports two optional parameters. The first, expected, declares that a test method... a different exception than the one declared, the test fails. For example, the following
EclipsePro Test
EclipsePro Test       EclipsePro Test contains the powerful JUnit test generation... Eclipse development environment. JUnit Test Generation & Editing
Junit Test Suite
Junit Test Suite  Hi Sir I am a beginner to JUnit. I have created these three test classes - CounterTest,MyClassTest & PetTest. I want to run these all with a Test Suite. Please mention code with your answer. Best regards
test cases problem
test cases problem  what to write in the testing phase of my project. My project is a JSP project that generate graphs from the student marks... 6.7.1..please help me with the test cases that could be made out
TEST JAMES MAIL SERVER
TEST JAMES MAIL SERVER  How to test Apache James Mail Server for stress? Which Load Generator should we use to create requests in the form of mail at a controlled rate for SMTP and POP3? Actually I needed to test JVM of the mail
Online Test System Project
Online Test System Project  I want a full ready-made project on online test system in jsp. i am not using servlet but only jsp.And backend database as mysql. my email address is help me. send a full project on online test system
online test system
online test system  Hi, I am creating a project for online test system.There should be a timer,on pressing next button it will retrieve a next question and it will show on the same page,on completion of test it will show
 

 

 

DMCA.com