What will be the output of the following Java program? class String_demo { public static void main(String args[]) { int ascii[] = { 65, 66, 67, 68}; String s = new String(ascii, 1, 3); System.out.println(s); } }"
Answers
Answered by
0
Refer the attached image for the output.
Explanation:
Program:
public class Main
{
public static void main(String[] args)
{
int ascii[]={65, 66, 67, 68};
String s=new String(ascii,1,3);
System.out.println(s);
}
}
- The above program is written in the java language.
- Basically, java is a class based and also object oriented programming language.
- Java is used for many purposes.
- Java is used to develop many applications.
- Java is a programming language that is used on your computer by developers to build applications.
- It lowers costs, shortens timeframes for growth, promotes creativity, and strengthens application services.
Refer the attached image for the output.
Attachments:
Similar questions