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
alina1380 [7]
3 years ago
15

Java:

Computers and Technology
1 answer:
Agata [3.3K]3 years ago
5 0

Answer:

import java.util.*;

public class work {

// function for counting unique character

public static int numUnique(String input) {

boolean[] list = new boolean[Character.MAX_VALUE];

for (int i = 0; i < input.length(); i++) {

list[input.charAt(i)] = true;

}

int count = 0;

for (int i = 0; i <list.length; i++) {

if (list[i] == true){

count++;

}

}

return count;

}

public static void main(String args[])

{

List<String>list=new ArrayList<>(); // creatng array list of type string

list.add("abcdef");

list.add("aaabcd");

list.add("bccddee");

list.add("abcddd");

list.add("a");

for(String str:list)

{

// for printing the results

System.out.println("given string : "+ str+" , number of unique values :"+numUnique(str));

}

}

}

Explanation:

You might be interested in
You are driving on expressway with three lanes in your direction at a speed lower then
Kaylis [27]

<em>ANSWER:</em>

<em></em>

<h2>Pass on the left<em> </em></h2>

6 0
3 years ago
Read 2 more answers
What are two types of organizational structures designed to help an organization achieve its goals and objectives?
Fittoniya [83]

The answer is entrepreneurial and bureaucratic. Organizations that are large and small can achieve higher sales and other profit by properly matching their needs with the structure they use to operate.   the structure of an organization can help or hinder its progress toward accomplishing these goals and This are specific set up of organizations and ways to accomplish different goals. 

4 0
3 years ago
Read 2 more answers
I need help with this work
lisabon 2012 [21]

Answer:

B. Balanced depending and the type of questions

5 0
2 years ago
Help me please and thanks
Yuri [45]

Answer:

b

Explanation:

6 0
3 years ago
Explain in brief terms some of the technology and developments that were important in the history and development of the Interne
igomit [66]

Answer: The Internet started in the 1960s as a way for government researchers to share information. ... This eventually led to the formation of the ARPANET (Advanced Research Projects Agency Network), the network that ultimately evolved into what we now know as the Internet.

Have a nice day ahead :)

7 0
2 years ago
Other questions:
  • Name size of machine screw that is used to secure switches and receptacles to device boxes
    13·1 answer
  • What do you call the number that is used as an index to pinpoint a specific element within an array?
    14·1 answer
  • An iframe is an inline table for a website. True False i need an answer fast
    15·1 answer
  • What term refers to the text label that describes each data series?
    9·1 answer
  • What type of media is a hard disk​
    9·1 answer
  • Which of the following substances increases in quantity during repititive muscle contraction during oxygen deficti ?
    11·1 answer
  • What number will be output by the console.log command on line 5?
    9·1 answer
  • The post-closing trial balance shows the balances of only the ____ accounts at the end of the period.
    12·1 answer
  • Explain the basic operations of a computer system​
    6·1 answer
  • Windows 8 uses a(n) ________ account for easy access and storage of online files.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!