What is the difference between delete and delete[]

Answer Posted / nashiinformaticssolutions

• delete: Frees memory allocated for a single object.
• delete[]: Frees memory allocated for an array of objects.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why scanner is used in java?

750


What is the purpose of final keyword and when to use it?

748


What is the largest number a double can hold?

762


Can an interface implement another interface?

758


What is java autoboxing?

703


Explain inner classes ?

863


Is java still relevant?

707


Can we have more than one package statement in the source file?

834


Explain when we should make an instance variable private.

797


What is null in java?

691


What exactly is java?

690


What is the similarity between dynamic binding and linking?

785


Write a function for palindrome and factorial and explain?

847


What is regex in java?

684


What is java thread dump, how can we get java thread dump of a program?

760