Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!

mandy fern

Greenhorn
+ Follow
since Aug 21, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mandy fern

The rules are 2 numbers space 2 numbers space 3 numbers space 3 numbers
19 years ago
How do I write an exception class for a wrong isbn number format?
19 years ago
How do I print first character of each token?
Thanks
19 years ago
How do I write a program to extract initials from a name which has the following format:[ Dr. ] First name second first name third first name... Surname. The output should be something like this R. W. D. F.!
19 years ago
How do I write a method in() to read numbers from the console?
19 years ago
Thanks a lot!
19 years ago
public class number
{
public int[][] array2D = {
{ 1, 2, 3 ,4 , 5},
{ 6, 7, 8, 9, 10},
{ 11, 12, 13, 14, 15},
{ 16, 17, 18, 19, 20}
};
{
int a= Console.readInt("add a number");
array2D[0][0]=a;
int b= Console.readInt("add a number");
array2D[0][1]=b;
int c= Console.readInt("add a number");
array2D[0][2]=c;
int d= Console.readInt("add a number");
array2D[0][3]=d;
int e= Console.readInt("add a number");
array2D[0][4]=e;
int f= Console.readInt("add a number");
array2D[1][0]=f;
int g= Console.readInt("add a number");
array2D[1][1]=g;
int h= Console.readInt("add a number");
array2D[1][2]=h;
....etc

My question is:Is there a way to shorten this or do I have to to do this
for every component of the array?
19 years ago
public class Feld2D{

public int[][] number = {
{6,8,9,10,11},
{9,11,-4,25,11},
{-4,-8,-5,-7,-4}
};
int b= Console.readInt("enter a number");
How do I put the number into the 2d array from there?
19 years ago
Thanks!
I have got the solution now!
Mandy
19 years ago
Hi,
How can I calculate the rent price of a car?
rent price per day is 50$
for example I want to type in date 1= 04.07
date 2= 07.10
rent price?
19 years ago
int a=4;
int b=8;
a==5==b==8;
what is the return of the evaluation?
19 years ago
Thanks!
Mandy
19 years ago