ArrayDeque in Java[通俗易懂]

ArrayDeque in Java[通俗易懂]ArrayDequeinJavaArrayDequeinJavaprovidesawaytoapplyresizable-arrayinadditiontotheimplementationoftheDequeinterface.ItisalsoknownasArrayDoubleEndedQueueorArrayDeck.Thi…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

ArrayDeque in Java

ArrayDeque in Java provides a way to apply resizable-array in addition to the implementation of the Deque interface. It is also known as Array Double Ended Queue or Array Deck. This is a special kind of array that grows and allows users to add or remove an element from both the sides of the queue. Few important features of ArrayDeque are as follows:

  • Array deques have no capacity restrictions and they grow as necessary to support usage.
  • They are not thread-safe which means that in the absence of external synchronization, ArrayDeque does not support concurrent access by multiple threads.
  • Null elements are prohibited in the ArrayDeque.
  • ArrayDeque class is likely to be faster than Stack when used as a stack.
  • ArrayDeque class is likely to be faster than LinkedList when used as a queue.

Declaration:

public class ArrayDeque Element
   extends AbstractCollection
   implements DequeElement, Cloneable, Serializable

Here, Element refers to the element which can refer to any class, such as Integer or Stringclass.

Constructors in ArrayDeque:

  1. ArrayDeque(): Used to create an empty ArrayDeque and by default holds an initial capacity to hold 16 elements.
  2. ArrayDeque(Collection c): Used to create an ArrayDeque containing all the elements same as that of the specified collection.
  3. ArrayDeque(int numofElements): Used to create an empty ArrayDeque wand holds the capacity to contain a specified number of elements.

Example:

// Java program to demonstrate few functions of 
// ArrayDeque in Java 

import java.util.*; 
public class ArrayDequeDemo 
{ 
	public static void main(String[] args) 
	{ 
		// Intializing an deque 
		Deque<Integer> de_que = new ArrayDeque<Integer>(10); 

		// add() method to insert 
		de_que.add(10); 
		de_que.add(20); 
		de_que.add(30); 
		de_que.add(40); 
		de_que.add(50); 
		for (Integer element : de_que) 
		{ 
			System.out.println("Element : " + element); 
		} 

		System.out.println("Using clear() "); 

		// clear() method 
		de_que.clear(); 

		// addFirst() method to insert at start 
		de_que.addFirst(564); 
		de_que.addFirst(291); 

		// addLast() method to insert at end 
		de_que.addLast(24); 
		de_que.addLast(14); 

		System.out.println("Above elements are removed now"); 

		// Iterator() : 
		System.out.println("Elements of deque using Iterator :"); 
		for(Iterator itr = de_que.iterator(); itr.hasNext();) 
		{ 
			System.out.println(itr.next()); 
		} 

		// descendingIterator() : to reverse the deque order 
		System.out.println("Elements of deque in reverse order :"); 
		for(Iterator dItr = de_que.descendingIterator(); 
											dItr.hasNext();) 
		{ 
			System.out.println(dItr.next()); 
		} 

		// element() method : to get Head element 
		System.out.println("\nHead Element using element(): " + 
											de_que.element()); 

		// getFirst() method : to get Head element 
		System.out.println("Head Element using getFirst(): " + 
											de_que.getFirst()); 

		// getLast() method : to get last element 
		System.out.println("Last Element using getLast(): " + 
												de_que.getLast()); 

		// toArray() method : 
		Object[] arr = de_que.toArray(); 
		System.out.println("\nArray Size : " + arr.length); 

		System.out.print("Array elements : "); 
		for(int i=0; i<arr.length ; i++) 
			System.out.print(" " + arr[i]); 
			
		// peek() method : to get head 
		System.out.println("\nHead element : " + de_que.peek()); 
		
		// poll() method : to get head 
		System.out.println("Head element poll : " + de_que.poll()); 
		
		// push() method : 
		de_que.push(265); 
		de_que.push(984); 
		de_que.push(2365); 
		
		// remove() method : to get head 
		System.out.println("Head element remove : " + de_que.remove()); 
		
		System.out.println("The final array is: "+de_que); 
	} 
} 

Output:

Element : 10
Element : 20
Element : 30
Element : 40
Element : 50
Using clear() 
Above elements are removed now
Elements of deque using Iterator :
291
564
24
14
Elements of deque in reverse order :
14
24
564
291

Head Element using element(): 291
Head Element using getFirst(): 291
Last Element using getLast(): 14

Array Size : 4
Array elements :  291 564 24 14
Head element : 291
Head element poll : 291
Head element remove : 2365
The final array is: [984, 265, 564, 24, 14]

Methods in ArrayDeque:

  1. add(Element e) : The method inserts particular element at the end of the deque.
  2. addFirst(Element e) : The method inserts particular element at the start of the deque.
  3. addLast(Element e) : The method inserts particular element at the end of the deque. It is similiar to add() method
  4. clear() : The method removes all deque elements.
  5. size() : The method returns the no. of elements in deque.
  6. clone() : The method copies the deque.
  7. contains(Obj) : The method checks whether a deque contains the element or not
  8. Iterator() : The method returns an iterator over the deque.
  9. descendingIterator() : The method returns a reverse order iterator over the deque
  10. element() : The method returns element at the head of the deque
  11. getFirst(): The method returns first element of the deque
  12. getLast(): The method returns last element of the deque
  13. isEmpty(): The method checks whether the deque is empty or not.
  14. toArray(): The method returns array having the elements of deque.
  15. offer(Element e) : The method inserts element at the end of deque.
  16. offerFirst(Element e) : The method inserts element at the front of deque.
  17. offerLast(Element e) : The method inserts element at the end of deque.
  18. peek() : The method returns head element without removing it.
  19. peekFirst() : The method returns first element without removing it.
  20. peekLast() : The method returns last element without removing it.
  21. poll() : The method returns head element and also removes it
  22. pollFirst() : The method returns first element and also removes it
  23. pollLast() : The method returns last element and also removes it
  24. pop() : The method pops out an element for stack repesented by deque
  25. push(Element e) : The method pushes an element onto stack repesented by deque
  26. remove() : The method returns head element and also removes it
  27. removeFirst() : The method returns first element and also removes it
  28. removeLast() : The method returns last element and also removes it
  29. removeFirstOccurrence(Obj) : The method removes the element where it first occur in the deque.
  30. removeLastOccurrence(Obj) : The method removes the element where it last occur in the deque.

ArrayDeque addFirst() Method in Java

The java.util.ArrayDeque.addFirst(Object element) method in Java is used to insert a specific element at the front of this deque.

Syntax:

Array_Deque.addFirst(Object element)

Parameters: The parameter element is of the type ArrayDeque and refers to the element to be added.

Return Value: The function does not return any value.

Exceptions: The method throws NullPointerException if the passed parameter is NULL.

Below programs illustrate the Java.util.ArrayDeque.addFirst() method:
Program 1:

// Java code to illustrate addFirst() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<Integer> de_que = new ArrayDeque<Integer>(); 

		// Use add() method to add elements into the Deque 
		de_que.add(10); 
		de_que.add(15); 
		de_que.add(30); 
		de_que.add(20); 
		de_que.add(5); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Adding elements at front 
		de_que.addFirst(40); 
		de_que.addFirst(50); 
		de_que.addFirst(60); 
		de_que.addFirst(70); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque_front_addition: " + de_que); 

		// Adding elements using add() 
		de_que.add(1); 
		de_que.add(2); 
		de_que.add(3); 

		// Displaying the final ArrayDeque 
		System.out.println("Final ArrayDeque: " + de_que); 
	} 
} 

Output:

ArrayDeque: [10, 15, 30, 20, 5]
ArrayDeque_front_addition: [70, 60, 50, 40, 10, 15, 30, 20, 5]
Final ArrayDeque: [70, 60, 50, 40, 10, 15, 30, 20, 5, 1, 2, 3]

ArrayDeque add() Method in Java

The Java.util.ArrayDeque.add(Object element) method in Java is used to add a specific element at the end of the Deque. The function is similar to the addLast() method of ArrayDeque in Java.

Syntax:

Array_Deque.add(Object element)

Parameters: The parameter element is of the type ArrayDeque and refers to the element to be added to the Deque.

Return Value: The function returns True if the element is successfully added into the deque else it returns false.

Exceptions: The method throws NullPointerException if the passed parameter is NULL.

Below programs illustrate the Java.util.ArrayDeque.add() method:
Program 1: Adding String elements into the Deque.

// Java code to illustrate add() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Deque 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]

Program 2: Adding Integer elements into the Deque.

// Java code to illustrate add() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<Integer> de_que = new ArrayDeque<Integer>(); 

		// Use add() method to add elements into the Deque 
		de_que.add(10); 
		de_que.add(15); 
		de_que.add(30); 
		de_que.add(20); 
		de_que.add(5); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 
	} 
} 

Output:

ArrayDeque: [10, 15, 30, 20, 5]

ArrayDeque addLast() Method in Java

The java.util.ArrayDeque.addLast(Object element) method in Java is used to insert a specific element at the end of this deque. It is similar to the add() method in Java.

Syntax:

Array_Deque.addLast(Object element)

Parameters: The parameter element is of the type ArrayDeque and refers to the element to be added.

Return Value: The function does not return any value.

Exceptions: The method throws NullPointerException if the passed parameter is NULL.

Below programs illustrate the Java.util.ArrayDeque.addLast() method:
Program 1: Adding Integers to the Deque.

// Java code to illustrate addLast() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<Integer> de_que = new ArrayDeque<Integer>(); 

		// Use add() method to add elements into the Deque 
		de_que.add(10); 
		de_que.add(15); 
		de_que.add(30); 
		de_que.add(20); 
		de_que.add(5); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Adding elements at the end 
		de_que.addLast(40); 
		de_que.addLast(50); 
		de_que.addLast(60); 
		de_que.addLast(70); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque_end_addition: " + de_que); 
	} 
} 

Output:

ArrayDeque: [10, 15, 30, 20, 5]
ArrayDeque_end_addition: [10, 15, 30, 20, 5, 40, 50, 60, 70]

ArrayDeque getFirst() Method in Java

The java.util.ArrayDeque.getFirst() method in Java is used to retrieve or fetch the first element of the ArrayDeque. In the process, the method does not delete the element from the deque instead it just returns the first element of the deque.

Syntax:

Array_Deque.getFirst()

Parameters: The method does not take any parameter.

Return Value: The method returns the first element present in the Deque.

Below programs illustrate the Java.util.ArrayDeque.getFirst() method:

Program 1:

// Java code to illustrate getFirst() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		ArrayDeque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Deque 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Displaying the first element 
		System.out.println("The first element is: " + 
									de_que.getFirst()); 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]
The first element is: Welcome

ArrayDeque isEmpty() Method in Java

The Java.util.ArrayDeque.isEmpty() method in Java is used to check and verify if an ArrayDeque is empty or not. It returns True if the Deque is empty else it returns False.

Syntax:

Array_Deque.isEmpty()

Parameters: The method does not take any parameter.

Return Value: The function returns True if the deque is empty else it returns False.

Below programs illustrate the Java.util.ArrayDeque.isEmpty() method:

Program 1:

// Java code to illustrate isEmpty() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Deque 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Verifying if the Deque is empty or not 
		System.out.println("The Deque is empty? " + 
									de_que.isEmpty()); 

		// Clearing the deque 
		de_que.clear(); 

		// Verifying if the Deque is empty or not 
		System.out.println("The Deque is empty? " + 
									de_que.isEmpty()); 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]
The Deque is empty? false
The Deque is empty? true

ArrayDeque clear() Method in Java

The Java.util.ArrayDeque.clear() method in Java is used to remove all of the elements from the Deque. Using the clear() method only clears all the element from the deque and does not delete the deque. In other words, it can be said that the clear() method is used to only empty an existing ArrayDeque.

Syntax:

Array_Deque.clear()

Parameters: The method does not take any parameter.

Return Value: The function does not return any value.

Below programs illustrate the Java.util.ArrayDeque.clear() method:
Program 1:

// Java code to illustrate clear() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Deque 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Clearing the Deque 
		de_que.clear(); 

		// Displaying the Deque 
		System.out.println("ArrayDeque: " + de_que); 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]
ArrayDeque: []

ArrayDeque size() Method in Java

The Java.util.ArrayDeque.size() method in Java is used to get the size of the Deque or the number of elements present in the Deque.

Syntax:

Array_Deque.size()

Parameters: The method does not take any parameter.

Return Value: The method returns the size or the number of elements present in the Deque.

Below programs illustrate the Java.util.ArrayDeque.size() method:
Program 1: Adding String elements into the Deque.

// Java code to illustrate size() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Deque 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Displaying the size of Deque 
		System.out.println("The size is: " + de_que.size()); 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]
The size is: 5

ArrayDeque contains() Method in Java

The Java.util.ArrayDeque.contains() method in Java is used to check or verify whether a specific element is present in the Deque or not.

Syntax:

Array_Deque.contains(Object element)

Parameters: The parameter element is of the type of ArrayDeque. This is the element that needs to be tested if it is present in the deque or not.

Return Value: The method returns True if the element is present in the deque otherwise it returns False.

Below programs illustrate the Java.util.ArrayDeque.contains() method:
Program 1:

// Java code to illustrate contains() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Queue 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Check for "Geeks" in the deque 
		System.out.println("Does the deque contains 'Geeks'? "
						+ de_que.contains("Geeks")); 

		// Check for "4" in the deque 
		System.out.println("Does the deque contains '4'? "
						+ de_que.contains("4")); 

		// Check if the deque contains "No" 
		System.out.println("Does the deque contains 'No'? "
						+ de_que.contains("No")); 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]
Does the deque contains 'Geeks'? true
Does the deque contains '4'? true
Does the deque contains 'No'? false

ArrayDeque iterator() Method in Java

The Java.util.ArrayDeque.iterator() method is used to return an iterator of the elements of the ArrayDeque.

Syntax:

Iterator iterate_value = Array_Deque.iterator();

Parameters: The method does not take any parameter.

Return Value: The method iterates over the elements of the deque and returns the values(iterator).

Below programs illustrate the Java.util.ArrayDeque.iterator() method:
Program 1:

// Java code to illustrate iterator() 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		Deque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Queue 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Creating an iterator 
		Iterator value = de_que.iterator(); 

		// Displaying the values after iterating through the Deque 
		System.out.println("The iterator values are: "); 
		while (value.hasNext()) { 
			System.out.println(value.next()); 
		} 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]
The iterator values are: 
Welcome
To
Geeks
4
Geeks

ArrayDeque getLast() Method in Java

The java.util.ArrayDeque.getLast() method in Java is used to retrieve or fetch the last element of the ArrayDeque. In the process, the method does not delete the element from the deque instead it just returns the last element of the deque.

Syntax:

Array_Deque.getLast()

Parameters: The method does not take any parameter.

Return Value: The method returns the last element present in the Deque.

Below programs illustrate the Java.util.ArrayDeque.getLast() method:

Program 1:

// Java code to illustrate getLast() method of ArrayDeque 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		ArrayDeque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Deque 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Displaying the Last element 
		System.out.println("The last element is: " + de_que.getLast()); 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]
The last element is: Geeks

ArrayDeque element() Method in Java

The java.util.ArrayDeque.element() method in Java is used to retrieve or fetch the head of the ArrayDeque. In the process, the method does not delete the element from the deque instead it just returns the element.

Syntax:

Array_Deque.element()

Parameters: The method does not take any parameter.

Return Value: The method returns the element present at the head of the Deque.

Below programs illustrate the Java.util.ArrayDeque.element() method:
Program 1:

// Java code to illustrate ArrayDeque element() method 
import java.util.*; 

public class ArrayDequeDemo { 
	public static void main(String args[]) 
	{ 
		// Creating an empty ArrayDeque 
		ArrayDeque<String> de_que = new ArrayDeque<String>(); 

		// Use add() method to add elements into the Deque 
		de_que.add("Welcome"); 
		de_que.add("To"); 
		de_que.add("Geeks"); 
		de_que.add("4"); 
		de_que.add("Geeks"); 

		// Displaying the ArrayDeque 
		System.out.println("ArrayDeque: " + de_que); 

		// Displaying the head 
		System.out.println("The head element is: " + de_que.element()); 
	} 
} 

Output:

ArrayDeque: [Welcome, To, Geeks, 4, Geeks]
The head element is: Welcome

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/191300.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • stm32 独立看门狗时钟配置[通俗易懂]

    stm32 独立看门狗时钟配置[通俗易懂]独立看门狗的时钟源为40k,分频因子最大为256//初始化独立看门狗 5秒钟//prer:分频数:0~7(只有低3位有效!)//分频因子=4*2^prer.但最大值只能是256!//rlr:重装载寄存器值:低12位有效,最大只能是4096//时间计算(大概):Tout=40K/((4*2^prer)*rlr)值.voidIWDG_Init(u8prer,u16rlr){ IWDG_Writ…

    2022年5月10日
    56
  • 通用目标检测_ug目标体完全处于工具体内部

    通用目标检测_ug目标体完全处于工具体内部睿智的目标检测-番外篇——数据增强在目标检测中的应用学习前言数据增强做了什么学习前言数据增强是非常重要的提高目标检测算法鲁棒性的手段,学习一下对身体有好处!数据增强做了什么…

    2022年10月10日
    0
  • 彻底禁止win10更新的锅「建议收藏」

    彻底禁止win10更新的锅「建议收藏」背景:tonight,和往常一样,就在打开vmware的一瞬间……突然弹出下面这个令人懵逼致死的图:百度搜索一通,众说纷纭,发现竟然还是win10系统的锅。下面开始解决问题,直接上图:这1903版本不支持vmware14,需要更新vm为15版本,商业套路,NM真够了,果断拒绝,还是另想办法吧;想着把1903更新卸载了,但是没有卵用,重启之后,出现下图,反应老半天…

    2022年6月17日
    20
  • VCL 控件分类_验证控件的分类

    VCL 控件分类_验证控件的分类TForm右下角小窗体中调整form显示位置。动态窗体:主窗体和动态生成的窗体(Project|Options|Forms)在一个头文件中添加另一个头文件(File|UseUnit)newTForm2(this);(this:指以此为容器)ShowModal(),Show();(是否当前窗体关闭后才能操作父窗体:模态方式,非模态方式)Close();(关闭窗体)(在Eve

    2022年9月25日
    0
  • MAC下最好用的抓包工具–charles简单操作教程

    MAC下最好用的抓包工具–charles简单操作教程一、Charles介绍给大家推荐一款在mac上我觉得很好用的抓包工具,再过去的半年中给我很大帮助,在工作学习中使用很方便。那么什情况下我们会需要使用抓包工具呢,比如我想查看一个接口请求的参数、返回值,还有移动设备上的http请求、https请求,有了charles一下搞定,妈妈再也不用担心我的学习了,咳咳……,回归正题,介绍一下charles。Charles是一个HTTP代理服务器…

    2022年6月12日
    56
  • busybox如何安装(如何安装busybox)

    step1.adbpushc:/busybox/mnt/sdcard/step2.用”re文件管理器”把已经拷到sdcard的busybox移动到/system/xbin目录step3.依次执行下面adb命令adbshellsumount-oremount,rw-tyaffs2/dev/block/mtdblock3/systemcd/syste

    2022年4月12日
    182

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号