Names

Ads

 
 

Share on Google+Share on Google+

Faisal Ansari
Names
1 Answer(s)      6 years and 7 months ago
Posted in : Java Beginners

Pl correct this program. This program will take character from user and show all the name which start that character.

import javax.swing.*; class Name1{ public static void main (String arg[]){ char ch; String =JOptionPane.showInputDialog(null,"Enter any character"); switch(ch){ case 1: JOptionPane.showMessageDialog(null,"Ali\n Azam\n Afzal\n"); break; case 2: JOptionPane.showMessageDialog(null,"Babar\n Bebo\n Bell\n"); break; default: JOptionPane.showMessageDialog(null,"Invalid"); } } }

Ads
View Answers

February 16, 2011 at 10:42 AM


Display name which starts with particular character

import javax.swing.*;
class Name1{ 
    public static void main (String arg[]){

        String st=JOptionPane.showInputDialog(null,"Enter any character");
        char ch=st.charAt(0);
        switch(ch){
            case 'a': JOptionPane.showMessageDialog(null,"Ali\n Azam\n Afzal\n");
            break;
            case 'b': JOptionPane.showMessageDialog(null,"Babar\n Bebo\n Bell\n");
            break;
            default: 
                JOptionPane.showMessageDialog(null,"Invalid");
            } 
            } 
            }

Ads









Related Tutorials/Questions & Answers:
Advertisements
JNDI names in netbeans
JNDI names in netbeans  how to create a JNDI names in netbeans
Sorting Country names alphabetically
Sorting Country names alphabetically  Hello, I have a list of country names in an array. I need a jsp code which will sort me the country names in an alphaberical order. It would be more useful when I get the coding using
pass parameter names and values
pass parameter names and values  What is the <jsp:param> standard action?   The <jsp:param> standard action is used with <jsp:include> or <jsp:forward> to pass parameter names and values
ipad default image names
ipad default image names  i have a problem while launching application in iPad. The Default image that i have set is not displaying in landscape mode correctly. please suggest. Thanks.   ipad Default image names
Display set names
Display set names  If i enter the First letter of a name it will display the list of names starting with that letter in command prompt using java   import java.util.*; class DisplaySetOfNames{ public static void
Version of com.jaredrummler>android-device-names dependency
List of Version of com.jaredrummler>android-device-names dependency
Version of com.real-comp>names-common dependency
List of Version of com.real-comp>names-common dependency
Version of com.slamdata>xml-names-core_2.10 dependency
List of Version of com.slamdata>xml-names-core_2.10 dependency
Version of com.slamdata>xml-names-core_2.11 dependency
List of Version of com.slamdata>xml-names-core_2.11 dependency
Version of com.slamdata>xml-names-core_2.12 dependency
List of Version of com.slamdata>xml-names-core_2.12 dependency
Version of com.slamdata>xml-names-scalacheck_2.10 dependency
List of Version of com.slamdata>xml-names-scalacheck_2.10 dependency
Version of com.slamdata>xml-names-scalacheck_2.11 dependency
List of Version of com.slamdata>xml-names-scalacheck_2.11 dependency
Version of com.slamdata>xml-names-scalacheck_2.12 dependency
List of Version of com.slamdata>xml-names-scalacheck_2.12 dependency
Maven Dependency names-common >> 1.0.0
You should include the dependency code given in this page to add Maven Dependency of com.real-comp >> names-common version1.0.0 in your project
Chaldean universal identifications names compiler on the application for Funtepoz
Chaldean universal identifications names compiler on the application for Funtepoz  I want to set up criteria on application table. It is chaldean numerology. I want 30 letters and 4 names in the identification and L and E should
Class names don't identify a class - Java Tutorials
Class names don't identify a class In JDK 1.2 the Sum Microsystems have added a new feature that allows you to identify a class not only by its name but also by its context for which it was loaded. For this you need to set
Need to know struts1 all jar file names
Need to know struts1 all jar file names  Hi, My name is Neeraj, I want to know all the jar file names for struts1 and plz provide me the link to download these files. Thanks & Regards Neeraj
SQL All Column Names
SQL All Column Names       SQL All Column Names is useful when you want to see the Field, Type, Null... on 'SQL All Column Names'. To understand and grasp the example we create a table
Chaldean universal identifications names compiler on the application for Funtepoz1
Chaldean universal identifications names compiler on the application for Funtepoz1  In which programme this VBA can be writen: Function Tryme(mycell) mylen = Len(mycell) For j = 1 To mylen mytest = UCase(Mid(mycell, j, 1
Display set of names from array
Display set of names from array In this section, you will learn how to display the set of names from array. In the given code, we have declared an array of string consisting of some countries name. We have prompted the user to enter
Maven Dependency android-device-names >> 1.0.0
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.0 in your project
Maven Dependency android-device-names >> 1.0.1
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.1 in your project
Maven Dependency android-device-names >> 1.0.2
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.2 in your project
Maven Dependency android-device-names >> 1.0.3
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.3 in your project
Maven Dependency android-device-names >> 1.0.4
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.4 in your project
Maven Dependency android-device-names >> 1.0.5
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.5 in your project
Maven Dependency android-device-names >> 1.0.6
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.6 in your project
Maven Dependency android-device-names >> 1.0.7
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.7 in your project
Maven Dependency android-device-names >> 1.0.8
You should include the dependency code given in this page to add Maven Dependency of com.jaredrummler >> android-device-names version1.0.8 in your project