1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
svlad2 [7]
3 years ago
15

The length property of the String object returns

Computers and Technology
1 answer:
Katyanochek1 [597]3 years ago
4 0

Answer:

the number of characters in the string.

Explanation:

length property of a String object returns the total count of the characters in the string or provides the length of the string simply.

For example:-

import java.util.*;

import java.lang.*;

import java.io.*;

class length

{

public static void main (String[] args)

{

    String s="IamNumber4";

    int l=s.length();//using length method on string object..

    System.out.println(l);

}

}

Output:-

10

The code written above is in java.The length() method returned the count of characters of the string s that is a actually 10.

You might be interested in
I need HELP ASAP! 30 POINTS to the RIGHT answer.
Travka [436]
I would say go with
D. winzip
5 0
4 years ago
Read 2 more answers
Convert 128 GB into KB​
goblinko [34]

Answer:

1,073,741,274  KB

Explanation:

Use an unit convertor or an calculator.

8 0
3 years ago
Read 2 more answers
Hope goes through the steps of sorting a list. The resulting list is shown below.
Dmitry [639]

Answer:

Click the Header Row option.

Explanation:

7 0
3 years ago
g (Locate the largest element) Write the following method that returns the location of the largest element in a two-dimensional
ruslelena [56]

Answer:

The method in JAVA is shown below.

static double largest = 0.0;

   static int[] idx = new int[2];

   public static int r = 20;

   public static int c = 20;

   public static int[] locateLargest(double[][] a)

   {

       for(int j=0; j<c; j++)

 {

     for(int k=0; k<r; k++)

     {

         if(largest<a[j][k])

         {

             largest=a[j][k];

             idx[0]=k;

             idx[1]=j;

         }

     }

 }

 return idx;

   }

The JAVA program is shown below.

import java.util.Scanner;

import java.lang.*;

class program

{

   //static variables declared and initialized as required

   static double largest = 0.0;

   static int[] idx = new int[2];

   public static int r = 20;

   public static int c = 20;

   public static int[] locateLargest(double[][] a)

   {

       for(int j=0; j<c; j++)

 {

     for(int k=0; k<r; k++)

     {

         if(largest<a[j][k])

         {

             largest=a[j][k];

             idx[0]=k;

             idx[1]=j;

         }

     }

 }

 return idx;

   }

}

public class Main

{

   static double[][] arr;

   static double input;

   public static void main(String[] args){

       program ob = new program();

       arr = new double[ob.r][ob.c];

    Scanner sc = new Scanner(System.in);

 for(int j=0; j<ob.c; j++)

 {

     for(int k=0; k<ob.r; k++)

     {

         arr[j][k]=0;

     }

 }

 System.out.println("Enter the elements of two dimensional array ");

 for(int j=0; j<ob.c; j++)

 {

     for(int k=0; k<ob.r; k++)

     {

         input = sc.nextDouble();

         if(input>0)

          {   arr[j][k] = input;

          //System.out.println(arr[j][k]);

          }

         else

             break;

     }

     break;

 }

 int[] large_idx = ob.locateLargest(arr);

       int row = large_idx[0];

 int col = large_idx[1];

 double l = arr[col][row];

 System.out.println("The largest element in the user entered array is " + l);

}

}

OUTPUT

Enter the elements of two dimensional array  

1

2

3

4

5

6

7

8

9

0

The largest element in the user entered array is 9.0

Explanation:

1. The class program contains the locateLargest() method as mentioned in the question.

2. The public class Main contains the main() method.

3. User input for array is taken inside main().

4. This array is passed to the locateLargest() method.

5. This method returns the one dimensional array having row and column indices of the largest element in the array.

6. The indices are used to display the largest element in the main().

8 0
3 years ago
How to reset windows 7 password without logging in
hammer [34]

Explanation:

<em>.</em><em>Reboot your laptop or PC. </em>

<em>Select the Repair your Computer option and press Enter. </em>

<em>The System Recovery Options window will popup, click System Restore, it will check the data in your Restore Partition and factory reset laptop without password.</em>

4 0
3 years ago
Read 2 more answers
Other questions:
  • Determine the value of base x of (211)x=(152)8
    8·2 answers
  • If you wanna buy a Monitor, please explain why you wanna buy it! PLEASE HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!
    9·1 answer
  • Suppose two hosts, A and B, are connected by a 10 Mbps link. The length of a packet is 12 Kb (Kilobits, i.e., 12 × 103 bits). Th
    15·1 answer
  • Which of the following best supports the utilization of environmental engineers on a civil engineering hydraulic project?
    13·1 answer
  • When troubleshooting firewalls, you should never attempt to repeat the problem because you could do more damage. T/F
    6·1 answer
  • PLEASE HURRY PLEASE HELP THIS CLASS ENDS TODAY AND I NEED HELP
    7·1 answer
  • Buying the newest phone as soon as it is released when your current phone works perfectly is not a good idea for all but which o
    10·2 answers
  • What is information cycle
    15·2 answers
  • The while loop and the do loop are equivalent in their expressive power; in other words, you can rewrite a while loop using a do
    6·1 answer
  • Which is used for making documentation file from microsoft office package​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!