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



Home Answers Viewqa Java-Beginners Plz give java coding for this

Have Programming Question? Ask it here!
 
 
 


danny
Plz give java coding for this
2 Answer(s)      3 years and 3 months ago
Posted in : Java Beginners


  ******    *
       *    *
  ***********    
  *    *
  *    ******

Advertisement
View Answers

January 10, 2011 at 1:10 PM


Hello Friend;

below is the code :

public class Pattern { public static void main(String[] args) {

    int iMin = 1, iMax = 8, iMid; // give max. value in even no.
    int jMin = 1, jMax = 12, jMid; // give max. value in even no.
    iMid = iMax / 2;
    jMid = jMax / 2;
    for (int i = iMin; i < iMax; i++) {
        for (int j = jMin; j < jMax; j++) {
            if (i % iMid == 0 || j % jMid == 0 || (i == iMin && j < jMid)
                    || (i == iMax - 1 && j > jMid)
                    || (i > iMid && j == jMin)
                    || (i < iMid && j == jMax - 1))
                System.out.print("* ");
            else {
                System.out.print("  ");
            }
        }
        System.out.println();
    }

}

}

Anuj Kumar (Knapster)

I thing this will print your desired pattern. :)



January 10, 2011 at 1:55 PM


thnk u boss



Related Tutorials/Questions & Answers:
Plz give java coding for this
Plz give java coding for this  ... iMin = 1, iMax = 8, iMid; // give max. value in even no. int jMin = 1, jMax = 12, jMid; // give max. value in even no. iMid = iMax / 2; jMid = jMax / 2
java coding help plz ?
java coding help plz ?  Given two integers N and M (N √Ę‚?į¬§ M), output all the prime numbers between N and M inclusive, one per line. N and M will be positive integers less than or equal to 1,000,000,000. The difference
Advertisements
Plz give the answers - Java Interview Questions
Plz give the answers  1.Computing cos(x) using the cosine series...), is the number itself. Write a JAVA program to find all perfect numbers between 2... information,Examples and tutorials on java visit to : http
plz give me answer
plz give me answer   description about string class methods   Java string methods
plz give me answer
plz give me answer   description about string class methods   Java string methods
plz give me answer
plz give me answer   description about string class methods   Java string methods
plz give me answer
plz give me answer  Discuss & Give brief description about string class methods   Java string methods
plz give me answer plz
plz give me answer plz  writw a programme to find rank from an array using doubledimmensionalarray
hi... pls give me the example of java coding fo following question
hi... pls give me the example of java coding fo following question  example java coding that reads in the radius and length of cylinder and computes volume. formula: Area = radius * radius * PI Volume = area * length
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that displays the following table (note that 1 mile is 1.609 kilometers). Miles Kilometers
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that prompts the user to enter the number of students and each student‚??s name and score, and finally displays the name of the students
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Suppose that the tuition for a university is RM10,000 this year and increases 5% every year. Write a program that computes the tuition in ten years and the total cost
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a function called ChangeToNext that take in an uppercase character parameter ch. The function returns the next uppercase character if ch is between 'A' and 'Y
hi... pls give me the example of java coding fo following question
hi... pls give me the example of java coding fo following question  Write a java program that reads the following information and prints a payroll statement: Employee‚??s name (e.g: Sam) Number of hours worked in a week (e.g: 10
hi... pls give me the example of java coding for following question
hi... pls give me the example of java coding for following question   Write a program that computes loan payments. The loan can be a car loan, a student loan, or a home mortgage loan. The program lets the user enter the interest
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a class that contains the following two methods: /* converts from inches to centimeters */ Public static double inchToCentimeter(double in) /* converts from
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Body Mass Index(BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters
Please give me coding for this..
Please give me coding for this..  Write an application that inputs one number consisting of five digits from the user.separates the number ibto its individual digits and prints the digits separated from one another by three
Plz give me code for this question
Plz give me code for this question  Program to find depth of the file in a directory and list all files those are having more number of parent directories
StringIndexOutOfBound error !!! plz give me the reason for this error ,plz.........
StringIndexOutOfBound error !!! plz give me the reason for this error ,plz.........  import java.util.Scanner; class Even { static int getEven(int...::::::::::::::::::::: java Even java Even Process started >>> enter the two numbers:: 1 10
i want to find the byte code of a image file ... for my project..plz if anybody help me for java coding i will grateful..
i want to find the byte code of a image file ... for my project..plz if anybody help me for java coding i will grateful..   i want to convert... project.. but i cant convert Image file to its byte code format.. if anybody can plz
Java Coding
Java Coding  Hello, Can u please tel me how to improve my coding techniques.I am feeling difficulty with coding but I am perfect with my theory part
java coding
java coding  plz correct this one ....i want to retrive data row from databse ...all its working but for combobox it not.......plz plz plz help me...... private void jButton4ActionPerformed(java.awt.event.ActionEvent evt
java coding
java coding  using swing i want to give an exit button which on clicking ask a msg "JOptionPane" is select "yes" then it should exit or else not....plez help me...... JOptionPane.showConfirmDialog(null,"DO YOU REALLY WANT
coding in java
coding in java  write a code to calculate the product of odd integers from 1-15   class ProductOfOddIntegers { public static void main(String[] args) { long product=1; for(int i=1;i<=15;i
coding - Java Beginners
coding  i need to start coding but i don't know how to start it so plz help me  Hi Friend, Please visit the following link: http://www.roseindia.net/java/ Thanks
java coding
java coding  Hi sir, WRITE A PROGRAMME TO MAKE EMPLOYMENT MANAGMENT HAVING COLORS AND FRAME IN IT,???? CAN U SUGGEST ME HOW TO MAKE IT IN CORE JAVA
java coding
java coding  sir i need code for how to send meg from one system to another system
java coding
java coding  i need to to a project in java and the title is file parsing. i need to read a file or if a particular file is given i have to count the no of vowels, pick out some terms, and to display the details about that file
java coding
java coding  i am using netbean to my project and it is Desktop Application.i want my textfield to accept only numbers or only alphabets .........plez plez plez do help me..........i am just beginner to java codes
java coding
java coding  Hai,I am having order table in mysql database.when user click download button the order table data shows in csv format.Its very urgent.please help me. Thanks in advance
java coding
java coding  (person, student,employee, faculty and staff are classes) design a class named person and its two subclasses named student and employee    class Person { public String name; public String address; public
java coding
java coding  can any one plez tell me how to retrive a row from access to each field of swing... i hav tried this but i am getting an SQL error "SQLExceptionOccurred[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
coding - Java Beginners
coding  i need start coding but don't have any idea to start plz help me
plz help me today plz plz - Java Interview Questions
plz help me today plz plz  2.) Suppose list is an array of six elements of type int. What is stored in list after the following java code executes? . for (i = 0; i < 5; i++) { list[i] = 2 * i + 5
Java application PLZ ?
Java application PLZ ?  Write an application that demonstrates each of the following methods, based on the statement String dedicate = ?Dedicated to making your event a most memorable one:; indexOf(?D?) charAt(15) endsWith(one
Java coding - WebSevices
Java coding for web services  How to start Java Coding for web services
Plz answer - Java Beginners
Plz answer  Create a Java Bean Class ‚?? Customer according to the below given class diagram. Customer... ------------------------------------------------- plz doreply me....thankz alot  
Plz send - Java Beginners
Plz send  Hi, please send whole code i understood ur sending sql query Thanks  hai dear frnd........ look how can i write... be a troublesome...then again wat r ur needs.... so plz...provide a deatiled structure
plz help - Java Beginners
plz help  i have to programs and it takes too long to run them so i... Thread in java : First Code : import java.io.PrintWriter; import......."); } } For more information on Thread in Java visit to : http
Coding - Java Beginners
Coding  How to do a coding to view employee name, salary and EPF... the technologies you create the application in Java/JSP/Servlet/JSF/Struts or other technologies and give your full details. Thanks
j2me coding - Java Magazine
in sms using j2me. i have a problem in coding for sending and receiving sms .i have a coding for receiving sms but it not work because that program need sending sms using port no.please give me a solution for this problem............ give me
plz answer - Java Beginners
plz answer   Write a Binary Search program that searches an array of ordered data. Compose an ordered array of 500 integers that contains the following series of numbers and run the search on it: 1, 2, 3, 5, 8, 13, 21, 34, 55
plz give me program to this: Given a string and a number ‘n’, find the ‘n’th distinct repeating character.
plz give me program to this: Given a string and a number ?n?, find the ?n?th distinct repeating character.    Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1
plz Help me - Java Beginners
plz Help me  Hi, I want learn struts,I dont have any idea about this plz help how can i make a framework.If u have any information then plz send my personal id plz tell me that whose software installed.and give me brief
java coding - Java Beginners
java coding  dear sir, i'm doing a java coding using with netbeans ide, so i'm trying to pass some text from one jframe to another jframe which is both are already opend on screen then how to do it? please send me
Image using Java coding
Image using Java coding  Hai, Display image in pdf file using Java coding through Xsl file.. Please help me.. xsl file generate the pdf file
color coding in java
color coding in java  hii..can anyone please help with auto coloring code in java swings..??a particular text field should have a particular color for a particular event..plzz help
single frame coding in java
single frame coding in java  sir, i am a beginner in java.i want to do a desktop application in java in which a single frame satisfies all needs.but i want changes in that frame only.how can i solve this?i think multiple frames
 

 

 

DMCA.com