In this post , I'll add linux commands which I needed while working.
1. Open file using sublime text.
continue reading Linux command
1. Open file using sublime text.
subl filename
subl filename
import java.util.Scanner; import java.util.Stack; public class MyStack { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String string = scanner.nextLine(); String output = ""; Stack stack = new Stack(); char[] array = string.toCharArray(); for (char c : array) { stack.push(c); } for (int i = 0; i < array.length; i++){ char c = (char) stack.pop(); output += c; } System.out.println("Reversed string : " + output); } }
import java.util.Scanner; public class MyStack { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scanner = new Scanner(System.in); String string = scanner.nextLine(); String output = ""; StringBuilder stringBuilder = new StringBuilder(); output = stringBuilder.append(string).reverse().toString(); System.out.println(output); } }
Tabs with fragments look better . In case of several screens I prefer adding tabs. I am going to describe the whole process of adding tabs i...