answersLogoWhite

0


Best Answer

public class CreateDatabase{ public static void main(){ int a=10; int b=20; int result =a+b; System.out.println(result); } }

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Wap to display string in the ascending order in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a program in java to display a string message using Servlets?

i dont no string for servlate


Write a program in java to enter 3 digits or more arrange the digits of the entered number in ascending order and display the result?

public static void main(String[] args) { int val = 100; int val1 = 50; System.out.println("Number of digits in " + val + " is: " + new String(val + "").length()); System.out.println("Number of digits in " + val1 + " is: " + new String(val1 + "").length()); }


What is concatetion operation used in java?

"+" is the concatenation operator in Java. It can be used to concatenate two strings. Ex: String firstName = "John"; String lastName = "Morrison"; System.out.println(firstName + " " + lastName); The above code snippet would display John Morrison in the console.


What does it mean to have a string split in java?

To have a string split in Java means that a string array, containing substrings (can be delimited by elements of a specified string or Unicode character array), is returned.


Ascending order program for java?

public class BubbleSortAscendingOrderDemo { public static void main(String a[]) { //Numbers which need to be sorted int numbers[] = {23,5,23,1,7,12,3,34,0}; //Displaying the numbers before sorting System.out.print("Before sorting, numbers are "); for(int i = 0; i < numbers.length; i++) { System.out.print(numbers[i]+" "); } System.out.println(); //Sorting in ascending order using bubble sort bubbleSortInAscendingOrder(numbers); //Displaying the numbers after sorting System.out.print("Before sorting, numbers are "); for(int i = 0; i < numbers.length; i++) { System.out.print(numbers[i]+" "); } }

Related questions

Write a program in java to display a string message using Servlets?

i dont no string for servlate


Write a program in java to enter 3 digits or more arrange the digits of the entered number in ascending order and display the result?

public static void main(String[] args) { int val = 100; int val1 = 50; System.out.println("Number of digits in " + val + " is: " + new String(val + "").length()); System.out.println("Number of digits in " + val1 + " is: " + new String(val1 + "").length()); }


What are some ways in order to perform String comparison in Java?

String comparison in Java features four ways. These ways are String comparison using equals method, equalsIgnoreCase method, CompareTo method, and CompareToIgnoreCase method.


What is concatetion operation used in java?

"+" is the concatenation operator in Java. It can be used to concatenate two strings. Ex: String firstName = "John"; String lastName = "Morrison"; System.out.println(firstName + " " + lastName); The above code snippet would display John Morrison in the console.


What are some example for string formatting in Java?

There are lots of examples of string formatting in Java. It can be difficult at times. Some of these examples are, but are not limited to; align, string, format, and JAVA.


How to Write a java program to display hello?

public class Hello{public static void main(String [] args){System.out.println("Hello");}}


How to Sort values in ascending order in java?

// If your values are stored in an array... Arrays.sort(valuesArray); // If they're stored in a List... Collections.sort(valuesList);


What does it mean to have a string split in java?

To have a string split in Java means that a string array, containing substrings (can be delimited by elements of a specified string or Unicode character array), is returned.


In computer terms what does the phrase 'java string replace' mean?

When referring to computer terms, the phrase "java string replace" means that a string in the line of code that Java uses, is being replaced, or needs to be replaced.


List out the version of java?

Running "java -version" will display the current version of Java.


How does the string trim work in Java?

The string trim works in Java by trimming white space from the beginning and end of a string. It cleans up the string and makes makes it neater for the users of the program.


What are the different between'a' and ''a in java string methods?

The difference between 'a' and "a" anywhere in Java is that 'a' is a primitive char type, while "a" is a String object.