Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
Java Help
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Dhanuka Nilanjana" data-source="post: 12693704" data-attributes="member: 230947"><p><span style="color: Red">1. Write a program that accepts ID, Name, E-mail address and Contact No. of all the students in a class and saves them in an array. Ask the user for the size of the class and the student details.</span></p><p><span style="color: Red"></span></p><p></p><p><span style="color: Blue">Meka iwara karanna help ekak dendoooooooooooo </span></p><p><span style="color: Blue">pahala tiyenne mama liwwa programme eka </span></p><p><span style="color: Blue"></span></p><p></p><p>.....................................................................................................................</p><p>import javax.swing.*;</p><p></p><p>public class ClassReg{</p><p></p><p> public static void main(String[] args){</p><p></p><p> String classsize=JOptionPane.showInputDialog("Enter the number of students in the class?");</p><p> </p><p> int students=Integer.parseInt(classsize);</p><p></p><p> int[] stid=new int[students];</p><p> String[] stname=new String[students];</p><p> String[] stphone=new String[students];</p><p> String[] stemail=new String[students];</p><p></p><p> for(int i=0;i<students;i++){</p><p></p><p> String studentid=JOptionPane.showInputDialog("Enter ID of the student "+ (i+1));</p><p></p><p> int idno=Integer.parseInt(studentid);</p><p></p><p> stid<em>=idno;</em></p><p><em></em></p><p><em></em></p><p><em> String studentname=JOptionPane.showInputDialog("Enter NAME of the student "+ (i+1));</em></p><p><em> </em></p><p><em> stname<em>=studentname;</em></em></p><p><em><em></em></em></p><p><em><em></em></em></p><p><em><em> String studentphone=JOptionPane.showInputDialog("Enter contact number of the student "+ (i+1));</em></em></p><p><em><em> </em></em></p><p><em><em> stphone<em>=studentphone;</em></em></em></p><p><em><em><em></em></em></em></p><p><em><em><em> String studentmail=JOptionPane.showInputDialog("Enter the Email address of the student?"+ (i+1));</em></em></em></p><p><em><em><em></em></em></em></p><p><em><em><em> stemail<em>=studentmail;</em></em></em></em></p><p><em><em><em><em></em></em></em></em></p><p><em><em><em><em></em></em></em></em></p><p><em><em><em><em> system.out.println("student id is "+idno +", " +" student name is "+stname<em>+""+" phoneno is"+stphone<em>+","+"email address is"+stemail<em>);</em></em></em></em></em></em></em></p><p><em><em><em><em><em><em><em></em></em></em></em></em></em></em></p><p><em><em><em><em><em><em><em></em></em></em></em></em></em></em></p><p><em><em><em><em><em><em><em> }</em></em></em></em></em></em></em></p><p><em><em><em><em><em><em><em></em></em></em></em></em></em></em></p><p> <em><em><em><em><em><em><em>}</em></em></em></em></em></em></em></p><p><em><em><em><em><em><em><em></em></em></em></em></em></em></em></p><p><em><em><em><em><em><em><em>}</em></em></em></em></em></em></em></p></blockquote><p></p>
[QUOTE="Dhanuka Nilanjana, post: 12693704, member: 230947"] [COLOR="Red"]1. Write a program that accepts ID, Name, E-mail address and Contact No. of all the students in a class and saves them in an array. Ask the user for the size of the class and the student details. [/COLOR] [COLOR="Blue"]Meka iwara karanna help ekak dendoooooooooooo pahala tiyenne mama liwwa programme eka [/COLOR] ..................................................................................................................... import javax.swing.*; public class ClassReg{ public static void main(String[] args){ String classsize=JOptionPane.showInputDialog("Enter the number of students in the class?"); int students=Integer.parseInt(classsize); int[] stid=new int[students]; String[] stname=new String[students]; String[] stphone=new String[students]; String[] stemail=new String[students]; for(int i=0;i<students;i++){ String studentid=JOptionPane.showInputDialog("Enter ID of the student "+ (i+1)); int idno=Integer.parseInt(studentid); stid[i]=idno; String studentname=JOptionPane.showInputDialog("Enter NAME of the student "+ (i+1)); stname[i]=studentname; String studentphone=JOptionPane.showInputDialog("Enter contact number of the student "+ (i+1)); stphone[i]=studentphone; String studentmail=JOptionPane.showInputDialog("Enter the Email address of the student?"+ (i+1)); stemail[i]=studentmail; system.out.println("student id is "+idno +", " +" student name is "+stname[i]+""+" phoneno is"+stphone[i]+","+"email address is"+stemail[i]); } } }[/i][/i][/i][/i][/i][/i][/i] [/QUOTE]
Insert quotes…
Verification
Hata thunen beduwama keeyada? (60 bedeema thuna)
Post reply
Top
Bottom