Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: what whould be the output

  1. #1
    Junior Member
    Join Date
    May 2022
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default what whould be the output

    what is the output of the following code in java

    int ar[] = {7,14,21,28,35};
    int k;
    for (k=4; k>0; k--)
    {
    system.out.print(ar[k-1]--+",");

  2. #2
    Member
    Join Date
    Apr 2022
    Posts
    36
    Thanks
    0
    Thanked 8 Times in 8 Posts

    Default Re: what whould be the output

    nothing

Similar Threads

  1. Replies: 8
    Last Post: June 26th, 2019, 05:28 AM
  2. Replies: 5
    Last Post: September 7th, 2014, 08:25 AM
  3. [SOLVED] Java runtime get result output from prompt problem with a larger output in type
    By kingwang98 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 14th, 2014, 08:52 AM
  4. how could I output to a text area the output of a method
    By mia_tech in forum What's Wrong With My Code?
    Replies: 6
    Last Post: July 12th, 2012, 07:49 PM
  5. Why am I getting this output?
    By ptabatt in forum What's Wrong With My Code?
    Replies: 5
    Last Post: August 6th, 2010, 07:36 PM