Display Date and Time Information in Lowercase in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

167 Views

Firstly, create a Formatter and a Calendar object.Formatter f = new Formatter(); Calendar c = Calendar.getInstance();To display complete date and time information use the ‘c’ conversion character. However, to display it in lowercase, use ‘tc’ −f = new Formatter(); System.out.println(f.format("Date and Time (lowercase): %tc", cal));The following is an example −Example Live Demoimport java.util.Calendar; import java.util.Formatter; public class Demo { public static void main(String args[]) { Formatter f = new Formatter(); Calendar cal = Calendar.getInstance(); System.out.println("Current date and time: "+cal.getTime()); ... Read More

Get Sublist from LinkedList in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

1K+ Views

The subList of a LinkedList can be obtained using the java.util.LinkedList.subList(). This method takes two parameters i.e. the start index for the sub-list(inclusive) and the end index for the sub-list(exclusive) from the required LinkedList. If the start index and the end index are the same, then an empty sub-list is returned.A program that demonstrates this is given as follows −Example Live Demoimport java.util.LinkedList; import java.util.List; public class Demo { public static void main(String[] args) { LinkedList l = new LinkedList(); l.add("John"); ... Read More

8085 Program to Perform Linear Search

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:24

2K+ Views

In this program we will see how to search an element in a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to search a key value in a block of data using linear search technique.DiscussionIn this program the data are stored at location 8002H to 8007H. The 8000H is containing the size of the block, and 8001H is holding the key value to search.After executing this program, it will return the address of the data where the item is found and store the address at location 9000H and9001H. If the item is not found, it will return FFFFH.If ... Read More

Make Arrangements for a College Conference

Ridhi Arora
Updated on 30-Jul-2019 22:30:24

302 Views

Any conference or fest in a college is a type of event which requires a lot of pre-planning and then only one can make it a huge success. In order to get some sort of praise, the organizers of the conference have to know everything in great detail before getting into the actual celebration.Check Out The Steps1. Participants In Conference: Know which delegates from which part of the country will be a part of the conference. Will there be any research scholars, teachers, students or any other important guests?2. Invite the Conference Participants: After noting the names and designations of ... Read More

Future of Content Writing in India

Ridhi Arora
Updated on 30-Jul-2019 22:30:24

107 Views

Content writing has a very wide scope in India, thus, its future is very bright. The causes of this bright future may be attributed to the use of this content is not only newspapers and magazines but also in social media vis-a-vis research papers.Domains In Content Writing with Good PotentialSEO: SEO refers to Search Engine Optimisation and a person who is involved in such a domain can earn a lot in this field. This content writer has a lot of demand in the present times too, so he will definitely be in demand in future.Fashion: Fashion bloggers may or may ... Read More

FTP PASV Function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

136 Views

The ftp_pasv() function turns the passive mode on or off.Syntaxftp_pasv(con, pasv)Parameterscon − The FTP connectionpasv − Specifies the passive mode. The following are the possible values −TRUE (passive mode on)FALSE (passive mode off)ReturnThe ftp_pasv() function returns TRUE on success or FALSE on failureExampleThe following is an example −

Strip Filename of Its Extension After the Last Dot in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

4K+ Views

The method removeExtension() is used to strip a filename of its extension after the last dot. This method requires a single parameter i.e. the file name and it returns the file name without its extension.A program that demonstrates this is given as follows −Example Live Demoimport java.io.File; public class Demo {    public static String removeExtension(String fname) {       int pos = fname.lastIndexOf('.');       if(pos > -1)          return fname.substring(0, pos);       else          return fname;    }    public static void main(String[] args) {       System.out.println(removeExtension("c:\JavaProgram\demo1.txt")); ... Read More

Add a Single Element to a LinkedList in Java

Samual Sam
Updated on 30-Jul-2019 22:30:24

356 Views

A single element can be added to a LinkedList by using the java.util.LinkedList.add() method. This method has one parameter parameters i.e. the element that is to be inserted in the LinkedList.A program that demonstrates this is given as follows −Example Live Demoimport java.util.LinkedList; public class Demo { public static void main(String[] args) { LinkedList l = new LinkedList(); l.add("Magic"); System.out.println("The LinkedList is: " + l); } }OutputThe LinkedList is: [Magic]Now let us understand the above program.The LinkedList ... Read More

Description of 8257 DMA Controller Chip

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

1K+ Views

As per DIP package Intel 8257 DMA controller chip is a 40-pin programmable Integrated Circuit. The pin diagrams of physical and functional are indicated below. The DMA controller chip 8257 works in two modes namely slave mode and master mode. Likely the processor also works in two modes namely active mode and HOLD mode. The processor normally works in active mode where the processor works as the master of the computer system. The processor goes to the HOLD state only when DMA transfer is required and it gives control to the system bus.When the processor is programming 8257 it is ... Read More

8085 Program to Find the Smallest Number

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

10K+ Views

In this program we will see how to find the smallest number from a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to find the smallest number from a block of bytes.DiscussionIn this program the data are stored at location 8001H onwards. The 8000H is containing the size of the block. After executing this program, it will return the smallest number and store it at location 9000H.Logic is simple, we are taking the first number at register B to start the job. In each iteration we are getting the number from memory and storing it into register A. ... Read More

Advertisements