Answer:
<h2> RAM</h2>
- <em>It</em><em> </em><em> </em><em>stands</em><em> </em><em>for</em><em> </em><em>Random</em><em> </em><em>Access</em><em> </em><em>memory</em><em>.</em>
- <em>It</em><em> </em><em>is</em><em> </em><em>used</em><em> </em><em>for</em><em> </em><em>both</em><em> </em><em>purpose</em><em>(</em><em> </em><em>read</em><em> </em><em>and</em><em> </em><em>write</em><em>)</em><em>.</em>
- <em>It</em><em> </em><em>is</em><em> </em><em>volati</em><em>le</em><em> </em><em>memory</em><em>.</em>
<h2>
<em>R</em><em>O</em><em>M</em></h2>
- <em>It</em><em> </em><em>stands</em><em> </em><em>for</em><em> </em><em>Read</em><em> </em><em>only</em><em> </em><em>memory</em><em>.</em>
- <em>It</em><em> </em><em>can</em><em> </em><em>be</em><em> </em><em>used</em><em> </em><em>only</em><em> </em><em>to</em><em> </em><em>perform </em><em>the</em><em> </em><em>read</em><em> </em><em>oper</em><em>ation</em><em>.</em>
- <em>It</em><em> </em><em>is</em><em> </em><em>non-volatile</em><em>.</em>
<em>Hope</em><em> </em><em>this</em><em> </em><em>helps</em><em>.</em><em>.</em><em>.</em>
<em>Good</em><em> </em><em>luck</em><em> on</em><em> your</em><em> assignment</em><em>.</em><em>.</em><em>.</em>
Open your browser and go to localhost/PHPMyAdmin or click “Admin” in XAMPP UI. Now click Edit privileges and go to Change Admin password, type your password there and save it. Remember this password as it will be used to connect to your Database.
hope this helps!
Answer:
import java.io.*;
public class Main
{
public static void main(String[] args) throws IOException {
BufferedReader bufferObject=new BufferedReader(new InputStreamReader(System.in));
String stringObject=bufferObject.readLine();
while(!stringObject.equals("99:99AM")){
System.out.println(convertedTime(stringObject));
stringObject=bufferObject.readLine();
}
}
public static String convertedTime(String stringObject){
String s=stringObject.substring(stringObject.length()-2);
String[] timeObject=stringObject.substring(0,5).split(":");
if(s.equals("AM")){
if(timeObject[0].equals("12")) return "00"+timeObject[1];
else return timeObject[0]+timeObject[1];
}
else{
if(timeObject[0].equals("12")) return "12"+timeObject[1];
else{
int hours=Integer.valueOf(timeObject[0]);
timeObject[0]=String.valueOf(12+hours);
return timeObject[0]+timeObject[1];
}
}
}
}
Explanation:
- Inside the main method run a while loop until stringObject is not equal to the string "99:99AM".
- Call the convertedTime method and display the results.
- Use the same hours and minutes except for 12th hour If the time is in AM.
- Use "00" instead of 12, if it is 12th hour.
- Add hours to 12, if the time is in PM and don't change anything in case of 12.