Which declaration can be inserted at (1) without using a compilation error?
interface IConstants
{
int radius=42;
int side=69;
//(1) INSERT CODE HERE
}
Select the two correct answer.
(a)final double circumference= 2*Math.PI*radius;
(b)int total=total+radius+side;
(c)int AREA=radius*side;
(d)public static MAIN=15;
(e)protected int CODE = 31337;
interface IConstants
{
int radius=42;
int side=69;
//(1) INSERT CODE HERE
}
Select the two correct answer.
(a)final double circumference= 2*Math.PI*radius;
(b)int total=total+radius+side;
(c)int AREA=radius*side;
(d)public static MAIN=15;
(e)protected int CODE = 31337;
public class Main{
public static void main (String[] args) {
int i=0;
int[] a={3,6};
a[i]=i=9;
System.out.println(i+" "+a[0]+" "+a[1]);
}
}
public static void main (String[] args) {
int i=0;
int[] a={3,6};
a[i]=i=9;
System.out.println(i+" "+a[0]+" "+a[1]);
}
}
public class Main{
public static void main (String[] args) {
String s="Contenment!";
int middle=s.length()/2;
String n=s.substring(middle-1,middle+1);
System.out.println(s.lastIndexOf(n,middle));
}
}
public static void main (String[] args) {
String s="Contenment!";
int middle=s.length()/2;
String n=s.substring(middle-1,middle+1);
System.out.println(s.lastIndexOf(n,middle));
}
}
Which of the following is not a part of Data definition language
Anonymous Quiz
31%
RENAME
24%
REVOKE
24%
GRANT
22%
UPDATE
Which statement are true?
A)The expression (1+2+"3") evaluates to the String "33".
B)The expression ("1"+2+3) evaluates to the String "15".
C)The expression (4+1.0f) evaluates to the float value 5.0f.
D)The expression (10/9) evaluates to the int value 1.
E)The expression ('a'+1) evaluates to the char value 'b'.
A)The expression (1+2+"3") evaluates to the String "33".
B)The expression ("1"+2+3) evaluates to the String "15".
C)The expression (4+1.0f) evaluates to the float value 5.0f.
D)The expression (10/9) evaluates to the int value 1.
E)The expression ('a'+1) evaluates to the char value 'b'.
interface A{
public void aaa();
}
class AA implements A{
public void aaa(){
System.out.println("Hi");
}
}
class D extends AA{
public class Exa{
public void aaa(){
System.out.println("Wow");
}
public void main (String[] args) {
A a=new D();
a.aaa();
}
}
public void aaa(){
System.out.println("Bye");
}
}
public void aaa();
}
class AA implements A{
public void aaa(){
System.out.println("Hi");
}
}
class D extends AA{
public class Exa{
public void aaa(){
System.out.println("Wow");
}
public void main (String[] args) {
A a=new D();
a.aaa();
}
}
public void aaa(){
System.out.println("Bye");
}
}
public class Program
{
Integer funn(Integer a,Integer b){
if(b>a){
return b+funn(a+1,b-1);
}
else{
return a;
}
}
public static void main(String[] args) {
Program p=new Program();
System.out.println(p.funn(2,5));
}
}
{
Integer funn(Integer a,Integer b){
if(b>a){
return b+funn(a+1,b-1);
}
else{
return a;
}
}
public static void main(String[] args) {
Program p=new Program();
System.out.println(p.funn(2,5));
}
}
UML Diagram Course – How to Design Databases and Systems
https://www.freecodecamp.org/news/uml-diagrams-full-course/
https://www.freecodecamp.org/news/uml-diagrams-full-course/
freeCodeCamp.org
UML Diagram Course – How to Design Databases and Systems
UML is a standard way to diagram computer systems or databases. UML helps developers visualize the relationships between different pieces of software or hardware so they can more easily plan development. What does UML Stand for? A UML Definition in ...
public class Program
{
static String getString(long... ls){
return "ONE";
}
static String getString(Long... ls){
return "TWO";
}
static String getString(Integer i1,Integer i2){
return "THREE";
}
static String getString(Long l1,Long l2){
return "FOUR";
}
static String getString(Number n1,Number n2){
return "FIVE";
}
public static void main(String[] args) {
System.out.println(getString((byte)5,(byte)10)+","+getString(5,10));
System.out.println(getString(5L,10)+","+getString(5L,10L));
}
}
{
static String getString(long... ls){
return "ONE";
}
static String getString(Long... ls){
return "TWO";
}
static String getString(Integer i1,Integer i2){
return "THREE";
}
static String getString(Long l1,Long l2){
return "FOUR";
}
static String getString(Number n1,Number n2){
return "FIVE";
}
public static void main(String[] args) {
System.out.println(getString((byte)5,(byte)10)+","+getString(5,10));
System.out.println(getString(5L,10)+","+getString(5L,10L));
}
}
JDK 17: The new features in Java 17
https://www.infoworld.com/article/3606833/jdk-17-the-new-features-in-java-17.html
https://www.infoworld.com/article/3606833/jdk-17-the-new-features-in-java-17.html
InfoWorld
JDK 17: The new features in Java 17
The latest long-term support release of standard Java features always-strict floating point semantics, a foreign function and memory API, a uniform API for pseudo random number generators, and much more.