programming4us
programming4us
ENTERPRISE

Java Tutorials : Nested For Loop (part 2) - Program to create a Two-Dimensional Array

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

3.Program to create a Two-Dimensional Array
 

public class twoDimArray
{
public static void main(String [] args)
{
String city[][]={ {"NewYork","Muscat","London"} , {"Cairo","Beijing","CapeTown"} };
for (int i=0; i<city.length; i++)
{
for (int j=0; j<city[i].length; j++)
{
System.out.print(city[i][j]+"\t");
}
System.out.println();
}}}

 

Java - Take For Loop Variables And Put Into 2 Separate Array


4.Program to create multiplication table
 

public class multiplicationTable
{
public static void main(String args[]){System.out.print(" ");
for (int i=1; i<=9; i++)System.out.print(" "+i);System.out.println();
System.out.println("-------------------------------------------------------");
for (int i=1; i<=9; i++){System.out.print(i+"|");
for (int j=1; j<=9; j++){if (i*j<10)System.out.print(" "+i*j);
elseSystem.out.print(" "+i*j);}System.out.println();
}}}
Other  
  •  How to use scanf in C.
  •  Dynamic Arrays: Using malloc() and realloc()
  •  Review : D-Link DSP-W215 mydlink Wi-Fi Smart Plug
  •  Review : Linksys EA9200 Tri-Band Smart Wi-Fi router
  •  Identity on Cisco Firewalls : Administrative Access Control on ASA
  •  Identity on Cisco Firewalls : Administrative Access Control on IOS
  •  Identity on Cisco Firewalls : User-Based Zone Policy Firewall (part 3) - Integrating Auth-Proxy and the ZFW
  •  Identity on Cisco Firewalls : User-Based Zone Policy Firewall (part 2) - Establishing user-group Membership Awareness in IOS - Method 2
  •  Identity on Cisco Firewalls : User-Based Zone Policy Firewall (part 1) - Establishing user-group Membership Awareness in IOS - Method 1
  •  Identity on Cisco Firewalls : IOS User-Level Control with Auth-Proxy (part 4) - Combining Classic IP Inspection (CBAC) and Auth-Proxy
  •  
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    - Messages forwarded by Outlook rule go nowhere
    - Create and Deploy Windows 7 Image
    - How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
    - Creating and using an unencrypted cookie in ASP.NET
    - Directories
    - Poor Performance on Sharepoint 2010 Server
    - SBS 2008 ~ The e-mail alias already exists...
    - Public to Private IP - DNS Changes
    - Send Email from Winform application
    - How to create a .mdb file from ms sql server database.......
    programming4us programming4us
    programming4us
     
     
    programming4us