Following are the code in java to reverse any string without using reverse function.
import java.util.*; // import package
class Main // class
{
public static void main(String args[]) // main class in java
{
String s, r = ""; // string variable
Scanner out = new Scanner(System.in); // scanner classes to take input
System.out.println("Enter a string to reverse");
s = out.nextLine(); // input string
int l1 = s.length(); // finding length of string
l1=l1-1;
for ( int i = l1 ; i >= 0 ; i-- ) // for loop to reverse any string
{
r = r + s.charAt(i);
}
System.out.println(" The Reverse String is: "+r); // print reverse string
}
}
Explanation:
firstly we input any string ,finding the length of that string then after that iterating over the loop by using for loop and last display that reverse string
output
Enter a string to reverse
san ran
The Reverse String is: nar nas
Answer:
First Normal Form
Explanation:
The correct answer is - First Normal Form
Reason -
Given that,
A-B,C
C-F
D-E
Here the key is AD
The two partial Functional dependencies are -
A-B,C
D-E
So,
They are not in Second Normal Form, but they are in First Normal Form.
<span>Virtual private network (VPN) is the answer</span>
"detection" by checking for possible cycles or knots.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
First, we need to know what are the attributes of an object in object-oriented programming. In the object-oriented program, an entity that you are going to program considered an object. for example, students, class, course, teacher, and exam are objects in the learning management system. The attributes are the feature of an object whereas methods are the behaviors of an object
In this question, it is asked about to list or give an example of an attribute for a screen object. Screen object can be anything that shows display, for example, your laptop, mobile, tablet, billboard, etc.
The attribute of the screen object are listed below:
- screen size,
- screen manufacturer
- screen type (whether it is a laptop, monitor, digital watch screen, etc)
- screen width
- screen length
- screen color
- screen pixel
- Is it a touch screen
The above are some examples of an attribute for a screen object.